Edit This Code:
<!DOCTYPE html>
<html>
<body>
<p>A number divided by a string is not a number (NaN).</p>
<p>A number divided by a numeric string is a number.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = 1000 / "Apple";
    var y = 1000 / "10";
    document.getElementById("demo").innerHTML = x + "<br>" + y;
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy