The below code is just to display "true" or "false" based on whether the input to isNaN() function is a number or not. In isNaN() function, I am converting the type of number to string using the toString() function. But still, the output I am getting is 'false' instead of 'true'
<html>
<head>
<title>check</title>
<script type='text/javascript'>
function checkRun(){
var obj = {
atr : 1,
prof : 'dtc'
}
alert(isNaN(obj.atr.toString()));
}
</script>
</title>
</head>
<body>
<input type='text' name='checkName' id='check1' value='val1' class='class1'/><br><br>
<button type='button' name='checkName' id='check3' value='val3' class='class3' onclick='checkRun()'>Hello</button>
</body>
</html>