Conditional Statement in JavaScript

<html>
<body>
<h3>Conditional using JavaScript child, teen, young,adult, old ,</h3>
<p>Enter age:
<input type=&quot;number&quot; id=&quot;age&quot;></p>
<input type=&quot;button”&quot;value=&quot;CLICK HERE&quot; onclick=”&quot;check()&quot;/>
<script>
function check()
{
var ag=document.getElementById(‘age’).value;
ag=parseInt(ag);
if(Number.isInteger(ag))
{
if (ag<=13)
{
alert(‘You are Child’);
}
else if(ag<20)
{
alert(‘You are Teen’);
}
else if(ag<30)
{
alert(‘You are Adult’);
}
else if(ag<55)
{
alert(‘You are Young’);
}
else
{
alert(‘You are old’);
}
}
}
</script>
</body>
</html>