baseToNumber
If the value is string, it can be converted to its numeric form using
+.
console.log(typeof "1") console.log(typeof +"1")If the value is
symbol, NaN will be returned.
Output:
string number
Comments
Post a Comment