1
2 String(x) // returns a string from a number variable x
3
4 String(123) // returns a string from a number literal 123
5
6 String(100 + 23) // returns a string from a number from an expression
1/*
2* The global method Number() can convert strings to numbers.
3* Strings containing numbers (like "3.14") convert to numbers (like 3.14).
4* Empty strings convert to 0.
5* Anything else converts to NaN (Not a Number).
6*/
7Number("3.14") // returns 3.14
8Number(" ") // returns 0
9Number("") // returns 0
10Number("99 88") // returns NaN
11