String to int in js converts a string to an int

  • 2020-03-30 03:40:18
  • OfStack

Let me share one with you first

(link: https://www.jb51.net/article/154745.htm)

(link: https://www.jb51.net/article/154745.htm)

Today, when I was working on the project, I had a problem converting a String variable to an int. As usual, I wrote var I = Integer. ParseInt ("112"); But the console reported an error, saying 'Integer' undefined. Later, just know, the original js String int and Java is not the same, can not be directly used in Java js. Var j = parseInt("11"); With respect to ok.


Related articles: