Codington
0 of 8 problems solved • 0%
Use in a course

Exercise prompt

Convert Text to a Number

Number(value) converts numeric text into a number that can be used in a calculation.

Example

const countText = "4"; const count = Number(countText); console.log(count + 1);

The console displays 5, not the joined text 41.

Your task

Convert ageText into the number age. The existing calculation should then display Next age: 19.