Answer the question
In order to leave comments, you need to log in
How to make from string number in node.js?
Hello. How to convert string to number? For some reason the Number(...) function doesn't work. Well, for example, there is a string "222". I need to get this number 222 and write it to a variable.
Well, it doesn't work. Gives out NaN
Answer the question
In order to leave comments, you need to log in
parseFloat("222") // 222
parseFloat("222.2") // 222.2
//есть parseInt, но
parseInt("222") //222
parseInt("222.2") //222
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question