Javascript Tutorial - 5 - Prompt
Top Comments
All Comments (120)
-
var name=prompt("What is your name?");
document.write("Welcome," +name );
-
240p has never been so GOOD!
-
@toobywedge well I'm only 11 haha, but I should be measured as 17...
-
Here's a cool little multiplying app I made with the stuff Bucky said:
var name=prompt("What is your name?");
var num1=prompt("Enter a number");
var num2=prompt("Enter another number");
alert("Your aswer is "+num1*num2+", "+name);
-
42 ftw!!!
-
His real name is Greg Roberts
-
("Is that a "+obj+" in your pocket or are you just happy to see me?")
-
great tutorials - many thanks Hoss
-
//this is actually a usefull program. (note the e in the answer means "times 10")
//the 5 in toExponential just means we want to show 5 decimal places of accuracy.
var x = parseInt(prompt("What is your number? (bigger is better)"))
var z = (x.toExponential(5))
alert(x+ " in exponential form is "+z)
-
@austin10123 try tis...
var num1= prompt("enter your first number"); var num2= prompt ("enter your second number");
alert(Number(num1) +Number (num2));
Hope tis help u :)
("hello "+name+" glad to meet you");
movierobban 2 years ago 13
("Hello "+name+" you have a horrible name.")
This is what he meant to put on the video.
PJSkitszels 1 year ago 5