@BraveMeat, well once you get your website online you would have to set up a cgi bin to collect the data and store it on your server. Then you can open up the file and see the data. This does require extra coding outside of javascript.
I absolutely love your tutorials! They are so easy to understand. I am 14 and have been trying to learn javascript for 1 or 2 years with no success, but these have helped so much! THANK YOU!
Nice Video. I have a question though. As many of you have seen when you enter your routers home page (192.168.0.1 for example) a window appears that requires you to enter both user name and password. How does this happens? As i know you can have more than one input in a prompt
@zlakieprograming it's always good to learn from books for best coverage of knowledge. Web tutorials are mostly just quick info and tips. W3school is a great place to learn all the features of all web languages.
what if you wanted to do something were it would say something like hello "+name glad to meet you. because I was wondering how, if u can, make the rest of the words after "+name apear on the page.
the prompt returns the message as a type "string". So it treats the input the same way as it would text. You cant "add" strings, the + operator concatenates them, adding them to the end of each other. To output the sum of 1 + 1, you need to state that they are of number types.
@monofono2006 Because he multiplied it. If you're trying to add them together with the "+" symbol, then it will literally add them together. If you put "5 + 6" the result will be 56. This is because it's being read as a string instead of an integer.
well threre are some bugs im working on because when you actually type the second sector of coding lines for example
the first line lets make it: var num1=prompt(num----blalalblal
but then when you try to repeat the same code but with difrent sing for example / division / multiplication * or any other sing it give syou false numbers im try to fix it so that way all bugs will be gone lol and hey keep up the good work nice vids by th way
240p has never been so GOOD!
legobobsleder 14 hours ago
@toobywedge well I'm only 11 haha, but I should be measured as 17...
UltraDrago2000 3 weeks ago
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);
cryptitude 4 weeks ago
42 ftw!!!
adjgamer 1 month ago
His real name is Greg Roberts
chuganator 1 month ago
("Is that a "+obj+" in your pocket or are you just happy to see me?")
B1KMusic 1 month ago
great tutorials - many thanks Hoss
kiekelly 2 months ago
//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)
vodkacannon 2 months ago
var name=prompt("what is ur name?");
alert("fuck you "+name);
:P
IPurplePro 3 months ago
Ok, It's very good to learn JV tutorial here on youtube.com. Thanks Mr.Scott
coffeedelta 4 months ago
Case *,-,/ is very good but case + doesn't work!
coffeedelta 4 months ago
When I do addition, It doesnt add the two numbers, it just puts them next to eachother. Any help?
austin10123 4 months ago
@austin10123 same thing happens to me :(
l0lxlllxl0l 4 months ago
@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 :)
futureprogrammer27 2 months ago
JavaScript uses the same logic as Java!
RASHTG 6 months ago
This has been flagged as spam show
Who? Mike Jones!
omarplm5 6 months ago
@BraveMeat, well once you get your website online you would have to set up a cgi bin to collect the data and store it on your server. Then you can open up the file and see the data. This does require extra coding outside of javascript.
vodkacannon 6 months ago
The only problem with using parseInt means we're parsing an integer. So you can't do decimals. instead of using parseInt(prompt("Enter num1"));
You can do parseFloat. This allows you to used values like 4, 0.5, and -34.5.
vodkacannon 6 months ago
So if i create some fake website and i do javascript prompt for the victim to enter the password.Will it he save the password?
BraveMeat 7 months ago
the prompt command doesn't work for me.
prompt("What is your name?");
stumblinbear 7 months ago
i love javascript and im only 14
gmaninthusa 7 months ago
@gmaninthusa i love javascript and im only 12
toobywedge 7 months ago
@gmaninthusa I love javascript html php css vb6 C++ and html and i am only 14!
stumblinbear 7 months ago
@stumblinbear I'm 16 and I love them too ^^
kieferle242007 7 months ago
I absolutely love your tutorials! They are so easy to understand. I am 14 and have been trying to learn javascript for 1 or 2 years with no success, but these have helped so much! THANK YOU!
Bartholemew2 8 months ago
very very very and very thanks:)
r0oTsWe 9 months ago
If you agree that jQuery should be standard learning, please consider plussing this comment and help others see this link. : )
watch?v=Hk5oXFtYLw
"jquery for absolute beginners"
but don't stop watching this series, either. You'll need both series. : )
Libraries like jQuery and Prototype are the future of JS.
truthIsStranger 9 months ago
how do i get rid of the crlf thing?
b0redal0t 9 months ago
Amazing tutorials Bucky!
TheMinecrafter1231 10 months ago
Nice and simple!
kyousukeX 11 months ago
Is it possible to do what you did at the end of the video with addition?
I tried
var num1=prompt("number one here");
var num2=prompt("number two here");
alert(num1+num2)
Let's say num1 is 2 and num2 is 3, it comes out as 23. How to fix?
T1melimit 11 months ago
@T1melimit Well, it prints 23 instead of 5 because prompt returns a string of text not an integer. I'm sorry, but I don't know how to fix it.
MisterJ4512 11 months ago
how do i do that but with adding?? its reading my + sign as a "and" for example i type in 2 + 2 javascript reads it as 22.
peterhea222 11 months ago
@peterhea222 (2 + 2)
francisvolley 11 months ago
@francisvolley yes that is what i did i wrote it exactly as (2 + 2); thankyou for responding back but idk why its still not working
peterhea222 11 months ago
@peterhea222 check xxmikescottxx comment
francisvolley 11 months ago
var name=prompt("what's your name?");
alert("hello "+name);
alert("want to see some magic "+name+"?");
var num1=prompt("ok "+name+".. put any number that you want");
var num2=prompt("good. now, put here another number");
alert(num1+num2+"... magic?..");
try this and be amused :D..
BearZzZz1 11 months ago
great tutorial. How can I add to variables. us said num1*num2 but if you type in num1+num2 you get these two numbers in row.
mimpf96 11 months ago
@mimpf96 alert((num1+num2));
francisvolley 11 months ago
i see u all Js totorial and i like that all
rockysingh91 11 months ago
Nice Video. I have a question though. As many of you have seen when you enter your routers home page (192.168.0.1 for example) a window appears that requires you to enter both user name and password. How does this happens? As i know you can have more than one input in a prompt
aekara1987 1 year ago
@xXMikeScottXx - hey thanx bro! for that "parse" thing. Liked it
RJonStreetz 1 year ago
Thank you so much sir. Great tutorials for a beginner like me.
thisisgaurang 1 year ago
Mike Jones Who?Mike Jones Who?
9xDEAD 1 year ago
@9xDEAD Mike Jones you! =) Let's have gay buttsex no homo.
gamersgonebad 1 year ago
mike hawke
HawxTeamDelta 1 year ago
very easy to follow. thank you very much for your tutorials.
i'm gonna continue watch all parts.
lazzermusen 1 year ago
How do you create a radio button in javascript?
mcord21 1 year ago
Mike Jones? Classic.
thetaye 1 year ago
@thetaye That's my uncle's full name O.o
Nicro327 1 year ago
The " + " function does not work with your math example. It adds the numbers as a string. Any way to get around this? 2+2 ends up being 22.
mysg4ever 1 year ago
@mysg4ever put (2+2) that works
pointlessABC 1 year ago
thanks it helps mutch more than thousands of other videos on youtube that wont teach you anything at all
tornadomannen2 1 year ago
Comment removed
AnewBANDareHERE 1 year ago
("Hello "+name+" you have a horrible name.")
This is what he meant to put on the video.
PJSkitszels 1 year ago 5
Thanks dude now my webpage says Whats your name? Web I put guest, it says Hello Guest!
SonyFan1260 1 year ago
Java is so easy duh x_x
TheRealAuxiliary 1 year ago
@TheRealAuxiliary this is javascript
Biohazard000Labs 1 year ago
who? Mike Jones who? Mike Jones!!
MvD503 1 year ago
great for beginners
redhotchilipepperize 1 year ago
I am a freshman in Computer science and these videos have been of great value! Thanks for all your effort! Keep it up!
joaosing 1 year ago
what is easiest to learn javascript html or php
zlakieprograming 1 year ago
@zlakieprograming I feel HTML would be the easiest. But I have no idea how PHP is.
Antrikshy 1 year ago
@zlakieprograming it's always good to learn from books for best coverage of knowledge. Web tutorials are mostly just quick info and tips. W3school is a great place to learn all the features of all web languages.
Jameszhangdude 1 year ago
thanks so much
megalibra82 1 year ago
what if you wanted to do something were it would say something like hello "+name glad to meet you. because I was wondering how, if u can, make the rest of the words after "+name apear on the page.
Dragonx88888 2 years ago
("hello "+name+" glad to meet you");
movierobban 2 years ago 13
Another great tutorial!
dreamscapeeagle 2 years ago
@Chopinsiblos.
You are using the + operator in ur variable that is why you are getting 11, it is just adding 1 to 1, you want to use the * operator.
mitcoz2 2 years ago
Comment removed
xXMikeScottXx 2 years ago
@mitcoz2 no * is for multiplying. chopinsibols wants to add e numbers
eighteen4eva 2 years ago
your tutorials are the best, but 1+1 is 11...how could i solve that problem? thanks in advance..God Bless..
chopinsiblos 2 years ago
the prompt returns the message as a type "string". So it treats the input the same way as it would text. You cant "add" strings, the + operator concatenates them, adding them to the end of each other. To output the sum of 1 + 1, you need to state that they are of number types.
xXMikeScottXx 2 years ago
try this...
var num1 = parseInt(prompt("Enter num1"));
var num2 = parseInt(prompt("Enter num2"));
var answer = (num1 + num2);
alert(answer);
now the input is "parsed" as an integer rather than a string. Google javascript to string for more information.
xXMikeScottXx 2 years ago 30
@xXMikeScottXx he didn't have to parse it... and it worked.
monofono2006 1 year ago
@monofono2006 Because he multiplied it. If you're trying to add them together with the "+" symbol, then it will literally add them together. If you put "5 + 6" the result will be 56. This is because it's being read as a string instead of an integer.
RonBurgundy161 1 year ago
@xXMikeScottXx I get an error everytime I try this :(
djhiphop23 4 months ago
Comment removed
ryzanin 3 months ago
Comment removed
ryzanin 3 months ago
This has been flagged as spam show
@xXMikeScottXx
its better to validate the inputs the user gives you for example prompt them then do some if statements for example
if (num1 != parseInt(num1)) {
alert("please enter a proper integer for num1"); }
else if (num2 != parseInt(num2)) {
alert("please enter a proper integer for num2");
}
else {
alert(answer);
ryzanin 3 months ago
Comment removed
stvn0988 2 years ago
hey u r amaizing person
god bless u and ur family
but what is notepad++
i have normal one and i want to get the same software u have.
muslimblade 2 years ago
It alsow uses if else statements
123456789kamran 2 years ago
Im working on a question game that uses prompt and alerts so I need to watch JavaScript.
P.S
Your tutorials on JavaScript are the best!!!!
123456789kamran 2 years ago
That was some awesome vid you had!
elementoxygen 2 years ago
if you type (num1+num2);
it puts the two number together like 1 + 1 = 11
Jman9800 2 years ago 2
That's if num1 and num2 are strings. If you want to add the numbers in strings you can do: parseInt(num1)+parseInt(num2)
patrick99e99 2 years ago
I'm taking a course and I don't know what the hell my teacher is doing. But you make sense. Thanks.
Mangapulse 2 years ago 2
Wow, you make things MUCH easyier! I rated and subscribed!
CaptainTred 2 years ago
Mike Jones lol
jjtinyproductions 2 years ago
your website is down
Yousitech 2 years ago
its just like a video now?
Gh0sty1 2 years ago
Thanks
thewill2 2 years ago
keep doin wat ur doing.Its really helping.
Thanks alot
keeezz 2 years ago 2
well threre are some bugs im working on because when you actually type the second sector of coding lines for example
the first line lets make it: var num1=prompt(num----blalalblal
but then when you try to repeat the same code but with difrent sing for example / division / multiplication * or any other sing it give syou false numbers im try to fix it so that way all bugs will be gone lol and hey keep up the good work nice vids by th way
ergo247 2 years ago
actually if you type alert (num1*num2);
alert (num1+num2);
alert (num1/num2);
what it dows is that it gives you the results for the adition because we put a + sing and division because we also put a / sing
its preatty awsome
ergo247 2 years ago
What's to keep the user from entering a string of text instead of a number?
QuantumAnomaly 2 years ago
Hey, i find your videos really helpful. thanks alot
Carl436 2 years ago
it doesn't seem to work if you use +
thetawaves48 3 years ago
use this:
alert (Number(num1) + Number(num2));
should work fine...
OMGwhatusernametouse 3 years ago 2
how do you make a regular message to the use without the "script prompt to do it?
mrutilityquad 3 years ago
do u know how to work java script for SAM Broadcaster 3
AndrewBean90 3 years ago
great video man
SomaVIII 3 years ago 23
thanks ill try posting some more tutorials this weekend!
thenewboston 3 years ago 16
I look forward to watching them =]
I have been trying to learn JavaScript I have a book on it but I hate reading lol
SomaVIII 3 years ago
@thenewboston Hey I have a good question! Did you code your website? :D
Numberidge 7 months ago
how do i change the header of the alert box?
schetleft 3 years ago
it also says it on the alert box
schetleft 3 years ago
i don't want it to say "JavaScript Application"
schetleft 3 years ago
Good stuff especially for beginners keep up the good work!
staley412 3 years ago
The problems with these tutorials is there is so much more you can do with this but they dont even mention it.
weirdspencer 3 years ago
it covers the basics though.
frodo3332 3 years ago
You got me curious. What else can you do with these? Would you be willing to make some tutorials, that would be awesome!
monkeyflowers 3 years ago
HA if only i had the basics down. Im okay. But not the best. No where close to being ready to make tutorials.
weirdspencer 3 years ago
if u put if (name!=null && name!="") it wont accept u to write nothing so that is a very good thing to put in to
otherwise it might try to say nothing and that is a waste
Tehm4nm4n 3 years ago
Dude,
This is great stuff.
You are a natural teacher.
Please keep making tutorials.
Many thanks!
markpars 3 years ago 2
can you show me how to use prompt in forms?
whiteblue1942 4 years ago