I\'m trying to learn JS from a book (Beginner JavaScript by Jeremy McPeak), but I\'m stuck with this code:
myString is a string. The function parseInt(string, radix) will parse a string as a integer (see this for more examples).
The quotes are the way they are so that the output has the quotes displayed. If you don't want the quotes in the output the js could be simplified to:
document.write(myString + " is " + parseInt(myString, 10) + " as an integer" + "
");
but this wouldn't be as clear in showing how parseInt works.