Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript convert string to number

let int = "16";
int = +int;

console.log(int); // Output: 16
console.log(typeof int); Output: "number"
Source by thecodingcompany.hashnode.dev #
 
PREVIOUS NEXT
Tagged: #Javascript #convert #string #number
ADD COMMENT
Topic
Name
2+1 =