Type Conversion
Converting between data types.
Examples
String to Number
Explicitly converting a string to a number.
let x = "10";
let y = Number(x);
console.log(typeof y); // numberNumber to String
Explicitly converting a number to a string.
let x = 123;
let y = String(x);
console.log(typeof y); // stringTest Your Knowledge
JavaScript Quiz
No quiz available for this topic yet.