Created
January 19, 2019 10:43
-
-
Save ayuLiao/c8a8178fcc503fba70f1aa10502a7d4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//int型转换成string型 | |
var x=100 | |
a = x.toString() | |
var x=100; | |
a = x +""; //JS会自动隐性转换 | |
//将string 变成 int | |
parseInt("abc") // Returns NaN. | |
parseInt("12abc") // Returns 12. | |
parseInt("12") //Return 12. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment