Editing JavaScript/Notes/TypeConversion
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 98: | Line 98: | ||
=== Converting to Number === | === Converting to Number === | ||
Converting strings is a very common requirement and many approaches can be used. Any mathematical operator except the concatenation/addition operator will force type-conversion to number. | Converting strings is a very common requirement and many approaches can be used. Any mathematical operator except the concatenation/addition operator will force type-conversion to number. | ||
== parseInt(s, radix) == | == parseInt(s, radix) == |