JS Type Conversion
Explicit conversion shows what kind of value you need. Validate the result after conversion.
Where to run this
This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.
A practical example
const input = "12";
const places = Number(input);
console.log(Number.isFinite(places), places + 1);
What happens
The input becomes a finite number and the next value is 13.