var x = +"5"; // 5
alert("string to number explicitly: "+typeof x); // number
Now consider this:
When we convert a string to a number, the result is the numeric value of a string if it is simply a number; all other strings become NaN
var y = +"foo"; //NaN
alert(typeof y); // Why this results in number?