Complete the code to ask the user for their name using prompt.
const name = [1]('What is your name?');
The prompt function shows a dialog box asking the user for input.
Complete the code to convert the input string to a number.
const age = Number([1]);The prompt function returns a string. Wrapping it with Number() converts it to a number.
Fix the error in the code to correctly store user input in a variable.
let city; city = [1]('Enter your city');
Use prompt to get input from the user and assign it to the variable.
Fill both blanks to ask for a number and convert it to an integer.
const input = [1]('Enter a number'); const number = [2](input);
First, use prompt to get input as a string. Then use parseInt to convert it to an integer.
Fill all three blanks to get user input, convert to number, and check if it is positive.
const input = [1]('Enter a number'); const num = [2](input); const isPositive = num [3] 0;
Use prompt to get input, Number to convert it, and > to check if positive.
