function add (digit){
var figure = digit * 1.5;
console.log("Answer is " + figure);
}
add() = parseInt(prompt(”));
I
need help from someone I want o use the prompt to add a value to the add function parameter
I was expecting the prompt will pop up an input dialogue box in which I will input a value that will be placed in the add() function.
2
Answers
This should work just fine:
In your code only problem is following part
instead of above code just use this way