hello. i am currently learning javascript out of a book and i use to write the code samples so as to get attached. I have just run up to something weird though. the below code:

<script language="Javascript" type="text/javascript">

var myNumber = prompt("Enter the number to be rounded", "");

document.write("<h3>The number you entered was " + myNumber + "</h3><br>");
document.write("<p>The rounding results for this number are</p>");
document.write("<table width=150 border=1>");
document.write("<tr><td>parseInt()</td><td>" + parseInt(myNumber) + "</td></tr>");
document.write("<tr><td>ceil()</td><td>" + Math.ceil(myNumber) + "</td></tr>");
document.write("<tr><td>floor()</td><td>" + Math.floor(myNumber) + "</td></tr>");
document.write("<tr><td>round()</td><td>" + Math.round(myNumber) + "</td></tr>");

would return NaN where Math.ceil(myNumber), Math.floor(myNumber), Math.round(myNumber) code parts are. i tried to play with some more coding just to check whether problem lies, and it seems that the "bug" is in the Math function. What do you think? Is there something wrong with the code? am i missing something? the book was written in 2007. would there be some deprecations in the code it presents? Is there something wrong with my browser specifically? Can you please give me some help?