I would have done var name=prompt("Name") instead lol Im just saying say some typing but ya prolly already know! Nonetheless!!! Thanks! These are great! Just needed to brush up on the basics!
I would have done var name=prompt("greg") instead lol Im just saying say some typing but ya prolly already know! Nonetheless!!! Thanks! These are great! Just needed to brush up on the basics!
if your doing the first "if" statement, then the ( ) can be right against the "if" without spaces. if your doing the "else if" statement, you need a space after the "if"
dude this is getting pretty cool, i keep testing my own codes like branched off your own, i made this so its a prompt lol=)))))) im soo happy ttytytytytyty
LOL when i open google chrome i always get the last pages back where i was on. i lost my focus for this clip (i clicked an other tab instead of this one) and it said: '150'later'bob'later'tina. what happened here?
random question, has nothing to do with the vid really, but i tryed to make a calculator type program, where you just enter two numbers and it adds them together, but when i do the plus sign it just puts the two numbers right next to eachother, the exact same code works when i replace the adition sign with any other math sign, but why wont it work with addition, and is there another way i can do addition?
OMG!! You are a LIFESAVER!!!! THE YELLOW KIND!!!!! I have been having so much trouble trying to understand javascript and have not been able to find any other resources to help me!!! YOU ROCK!!!! BUUUT... a good example to use could be playing rock paper scissors... bc that is the game I am using for my class... any way THAAANK U
when i type in a var=prompt and a alert saying hell and what ever the var is it works..and when i put a "if" state-ment in it works andme with the else but when i put in a else if and promt comes us anding what ever u told it to say cuz when u put in the second var it doesent do enything
Thanks for your tutorials! Using only the first 10 I've created a "Guess the number" game! I just need to loop it and add a little randomness and it's done!
type that in google and download it, its free! and its the best editor out there! i think i show how to download it in my first XHTML tutorial too if u need help
@thenewboston yeah i have a linux console and if you save it as a java file it will flip colors onto your text editor as well lol i have no choice but to look at it change clolors
@ifthruim Hey, also, for anyone else having bother with this too. By default you probably won't get colours in your script. to get them you need to go to language>J>JSP. NOT javascript or java. Don't ask me why, i just figured it out.... hope it helps.
blown
Dharmajblackman 2 weeks ago
you can call me bobny
StaticM 2 months ago
u r an awesome tutor!!! hats off to u ^_^
futureprogrammer27 2 months ago
name = Steve;
*Alert Box*
Who the f r u?
Try it!
supersushi269 2 months ago
Its just 15 minutes since I started watching the tuts and I think I am getting pro already :P
supersushi269 2 months ago 3
I can't stop watching these. Yeah man. These are really good videos.
ianwjensen 2 months ago 5
Ty. U help alot
kidharris55 3 months ago
I would have done var name=prompt("Name") instead lol Im just saying say some typing but ya prolly already know! Nonetheless!!! Thanks! These are great! Just needed to brush up on the basics!
93jj25 4 months ago
I would have done var name=prompt("greg") instead lol Im just saying say some typing but ya prolly already know! Nonetheless!!! Thanks! These are great! Just needed to brush up on the basics!
93jj25 4 months ago
WHO THE FRU! Say it like fruit without "it"
Ostepopsex 4 months ago
This has been flagged as spam show
I am 14 and I watched almost 600 tutorials you made and they all learned me something!!
MUTORIALS 5 months ago
Comment removed
MUTORIALS 5 months ago
Comment removed
MUTORIALS 5 months ago
if your doing the first "if" statement, then the ( ) can be right against the "if" without spaces. if your doing the "else if" statement, you need a space after the "if"
JKTCGMV13 6 months ago
Omg, dude you are a very good teacher at this stuff. Thanks so much!
90cdowns 7 months ago
he sounds drunk
juxhesx 7 months ago
@asib12 UR A IDIOT U FORGOT TO UPDATE WEBSITE IN DESC IDIOT ASS
extremeweatherman8 7 months ago
@extremeweatherman8 WRONG VID
extremeweatherman8 7 months ago
SORRY
extremeweatherman8 7 months ago
this is so easy, i basicly just check the syntax and go to watch next video :)
vkvanja 7 months ago
assignment operator*
xxcky1 7 months ago
thumbs up if you got everything you needed to know from this video in the thumbnail.
CSryoh 8 months ago
oh i get it
SuperPikachuDude 8 months ago
y 2 = signs
SuperPikachuDude 8 months ago
@SuperPikachuDude One is to show is equal (==) and one is an assignment code (=)
xxcky1 7 months ago
I could see "who the f are you" coming lmao
wweFantasticHHH 8 months ago
so you can compare strings in javascript unlike C?
bondservant4Him 10 months ago
dude this is getting pretty cool, i keep testing my own codes like branched off your own, i made this so its a prompt lol=)))))) im soo happy ttytytytytyty
qazwsx0987654312 10 months ago
How would I do this if I was using OnClick and OnMouseOver, Out, etc: for onclick effects as well as hover rollover effects???
mikethedj4 10 months ago
Who the f are u - lol
neuromeditation 10 months ago
Gr8 job dude
SuperMani2020 11 months ago
LOL when i open google chrome i always get the last pages back where i was on. i lost my focus for this clip (i clicked an other tab instead of this one) and it said: '150'later'bob'later'tina. what happened here?
PATRICKKASIE 11 months ago
@thenewboston what kind of recording program are you using?
kurrethegs 1 year ago
Please disregard previous stupid question. Got a little ahead of myself.
IgnacioSantobar 1 year ago
random question, has nothing to do with the vid really, but i tryed to make a calculator type program, where you just enter two numbers and it adds them together, but when i do the plus sign it just puts the two numbers right next to eachother, the exact same code works when i replace the adition sign with any other math sign, but why wont it work with addition, and is there another way i can do addition?
Xenocide007 1 year ago
@Xenocide007 in order do add the numbers you have to add this: *1 its the only way to work
MrLiakuras 11 months ago
Comment removed
edmondxmosoon 11 months ago
@Xenocide007 it is because javascript is doing a string concatenation on them. use parseInt( );
ex:
var num1, num2;
document.write(parseInt(num1 = prompt("num1?")) + parseInt(num2 = prompt("num2?")));
hope that helps
edmondxmosoon 11 months ago
Comment removed
edmondxmosoon 11 months ago
Comment removed
edmondxmosoon 11 months ago
so a question, if you want to have a name how do you make it correct like:
var name=prompt("name?");
so how do you get it true if you type in GREG but it is set to greg, how can you make it true without the use of else if???
mylifeis2coolcmc2 1 year ago
@mylifeis2coolcmc2 use the toUpperCase() or toLowerCase() method.
ex:
var name = prompt("name?");
document.write(name.toUpperCase());
edmondxmosoon 11 months ago
lol @ "who the f r u" lol. Great tutorials!
InspiredByColor28 1 year ago
@gugglewuggle Silly, that just means you haven't saved it.
rangeispow 1 year ago
This has been flagged as spam show
hey heres a tip if your using ++: if the tab icon goes red your script has a fault in it
gugglewuggle 1 year ago
hey heres a tip if your using ++: if the tab icon goes red youy script has a fault in it
gugglewuggle 1 year ago
how do you make it so if the condition is false, you get redirected to another page?
123456789kamran 1 year ago
Just figured out why my script were not working I put elseif not else if.
LIFESAVER TUTORIAL
zeificaiOn 1 year ago
OMG!! You are a LIFESAVER!!!! THE YELLOW KIND!!!!! I have been having so much trouble trying to understand javascript and have not been able to find any other resources to help me!!! YOU ROCK!!!! BUUUT... a good example to use could be playing rock paper scissors... bc that is the game I am using for my class... any way THAAANK U
CarolDB1509 1 year ago
hay!
when i type in a var=prompt and a alert saying hell and what ever the var is it works..and when i put a "if" state-ment in it works andme with the else but when i put in a else if and promt comes us anding what ever u told it to say cuz when u put in the second var it doesent do enything
please help me
shadowdark911 1 year ago
Comment removed
shadowdark911 1 year ago
bye grego
TheSexyCeleb 1 year ago
stupid comment >> if I can only use else if 1 or 100 times, If I want to do it 2 times, I have to do it 98 more times "oh sob... oh cry."
BrianMNDBPH 1 year ago
Comment removed
betogm 1 year ago
Did a plane fly over your house at the end?
oliverjamescarr 1 year ago
This has been flagged as spam show
How do you add multiple ifs
here is the part of my script not working, I dont know how to add multiple ifs:
if (q2=="good","great") { alert("That is Wonderful!"); }
else if (q2=="bad","horrible") { alert("Sorry your day went bad..."); }
else { alert("Hmm, interesting..."); }
BandanaZZ 1 year ago
thanku
abhilabdas 1 year ago
none of your code works for me
carolinekershaw24 1 year ago
the hard part is functions, be prepared
DualKong 1 year ago
who the f r u jeje
lordofthemonths 1 year ago
Thanks for your tutorials! Using only the first 10 I've created a "Guess the number" game! I just need to loop it and add a little randomness and it's done!
spiceuvlife 1 year ago
It seems like I can only do a single if and an else.
If I make an if/else if/else the action will not run. Nothing will happen.
I am using Internet Explorer. Is that the problem?
JustaFreak15 2 years ago
probably not but i wouldn't use IE either way.
sekulr 1 year ago
You should always use === instead of ==. Because, for example:
""==false // return true!!!
""===false // returns false!
That is because === and !== do also compare the data type. Hope I helped, my english is not that good!
101m4p 2 years ago
Thanks! :D
ExtremeCardControl 2 years ago
"who the f r u" - nice :)
ruffstylez 2 years ago
mozilla firefox?
logi37 2 years ago
lol, "writing rhetorical questions with javascript"
richgilb 2 years ago
is it necesary to put { } before and after de alert....??
espero tu respuesta wee ajjaj
unlscrv2 2 years ago
yes that is the container for the code.
omega9o 2 years ago
no, if you have a single simple condition, you can have it on a single line:
if (blah) alert("blah!!");
... Also, there is a shortcut turnary syntax for if/else:
blah ? "blah!" : "no blah!"
That means, if blah is true (or exists), output blah!, otherwise output no blah!.
patrick99e99 2 years ago
Dude, I did the same exact thing, on Notepad++ but it still didn't work.
bmxmd2 2 years ago
I wrote this piece of script and can't figure out why it's not working. (Not sure if YouTube will display code, but here goes...)
var password=prompt('Please enter your password.');
if password=='123' { alert('Thank you!');
}
else { alert('Your password was incorrect.');
}
QuantumAnomaly 2 years ago
hi you did not use braces () to the if condition so it is not working .
vbrshi 2 years ago 3
dude put you brackets before like this:
If (password==123)
BajanCreation 2 years ago
Thanks for the clarification!
QuantumAnomaly 2 years ago
You are awesome!
isaykatsman 2 years ago
thank you man
now i learned some basic of javascript
vvurx 2 years ago
hey stevo
solarlight361 3 years ago
lmfao at "who the f r u" so funny LOL
CoolKidinTown07 3 years ago 2
I don't understand what program you're writing that in that colors the text. Tell me, please?
ifthruim 3 years ago 4
its called "notepad++"
type that in google and download it, its free! and its the best editor out there! i think i show how to download it in my first XHTML tutorial too if u need help
thenewboston 3 years ago 6
@thenewboston yeah i have a linux console and if you save it as a java file it will flip colors onto your text editor as well lol i have no choice but to look at it change clolors
iceemberpro 5 months ago
@ifthruim Hey, also, for anyone else having bother with this too. By default you probably won't get colours in your script. to get them you need to go to language>J>JSP. NOT javascript or java. Don't ask me why, i just figured it out.... hope it helps.
retromelon123 2 years ago
haha nevermind i just watched the tutorial again, i gotcha now
thenewboston 3 years ago 7
hello bobny
frodo3332 3 years ago 14
bobny? i dont get it
thenewboston 3 years ago 7
its one of the names you choose as an example.
frodo3332 3 years ago
@thenewboston hes pointing out u misspelled "bobby" as "bobny"
TheSexyCeleb 1 year ago
@thenewboston lol......
Chrisevil 9 months ago
@thenewboston
i think he's drunk
CMOODO 9 months ago
There is only one option: to alert "who the f r u" lololol! great tut helped me out in js and in glovepie scripting!
schetleft 3 years ago