1. implicit conversion (auto)
what type of data is stored in a variable, the variable is of data type
embodiment var a = 10; // number
var b = '1' // String
The display converter (manually)
the parseInt ( ) converts the contents into parentheses Number type and returns
the console.log (typeof B) // String
the console.log (typepf the parseInt (B)); // Number
3.String ()
the contents of the small width conversion parentheses a string and returns, as above.
js data type conversion
Guess you like
Origin blog.csdn.net/weixin_46146313/article/details/104108562
Ranking