How to display every line's result


#1

prompt("what is your Name");
prompt("what is Ubuntu?");

The output is nothing But the second prompt's Input which I have given
Why is the First prompts input not displayed.
Output:

"Operating System"
Similarly

5 * 10
5 / 50

Output:

0.1
Why is the output 50 not displayed How to make it visible in output screen


#2

use console.log() to print anything in output screen.

for example:

console.log(prompt("what is your Name"));

or
store the value to a variable first then print it.

x=prompt("what is your Name");
console.log(x)

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.