Casting type to string
|
|
When casting type to string, JavaScript simply calls the toString() method. |
The type cast can produce a string for a null or undefined value without error. |
var s1 = String(null); //"null" var oNull = null; var s2 = oNull.toString(); //won't work, causes an error
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
-
-
-
-
-
|