Added: 4 years ago
From: thenewboston
Views: 42,763
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (90)

Sign In or Sign Up now to post a comment!
  • blown

  • you can call me bobny

  • u r an awesome tutor!!! hats off to u ^_^

  • name = Steve;

    *Alert Box*

    Who the f r u?

    Try it!

  • Its just 15 minutes since I started watching the tuts and I think I am getting pro already :P

  • I can't stop watching these. Yeah man. These are really good videos.

  • Ty. U help alot

  • 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!

  • WHO THE FRU! Say it like fruit without "it"

  • Comment removed

  • Comment removed

  • 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"

  • Omg, dude you are a very good teacher at this stuff. Thanks so much!

  • he sounds drunk

  • @asib12 UR A IDIOT U FORGOT TO UPDATE WEBSITE IN DESC IDIOT ASS

  • @extremeweatherman8 WRONG VID

  • SORRY

    

  • this is so easy, i basicly just check the syntax and go to watch next video :)

  • assignment operator*

  • thumbs up if you got everything you needed to know from this video in the thumbnail.

  • oh i get it

  • y 2 = signs

  • @SuperPikachuDude One is to show is equal (==) and one is an assignment code (=)

  • I could see "who the f are you" coming lmao

  • so you can compare strings in javascript unlike C?

  • 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

  • How would I do this if I was using OnClick and OnMouseOver, Out, etc: for onclick effects as well as hover rollover effects???

  • Who the f are u - lol

  • Gr8 job dude

  • 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?

  • @thenewboston what kind of recording program are you using?

  • Please disregard previous stupid question. Got a little ahead of myself.

  • 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 in order do add the numbers you have to add this: *1 its the only way to work

  • Comment removed

  • @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

  • Comment removed

  • 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 use the toUpperCase() or toLowerCase() method.

    ex:

    var name = prompt("name?");

    document.write(name.toUpperCas­e());

  • lol @ "who the f r u" lol. Great tutorials!

  • @gugglewuggle Silly, that just means you haven't saved it.

  • hey heres a tip if your using ++: if the tab icon goes red youy script has a fault in it

  • how do you make it so if the condition is false, you get redirected to another page?

  • Just figured out why my script were not working I put elseif not else if.

    LIFESAVER TUTORIAL

  • 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

  • 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

  • Comment removed

  • bye grego

  • 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."

  • Comment removed

  • Did a plane fly over your house at the end?

  • thanku

  • none of your code works for me

  • the hard part is functions, be prepared

  • who the f r u jeje

  • 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!

  • 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?

  • probably not but i wouldn't use IE either way.

  • 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!

  • Thanks! :D

  • "who the f r u" - nice :)

  • mozilla firefox?

  • lol, "writing rhetorical questions with javascript"

  • is it necesary to put { } before and after de alert....??

    espero tu respuesta wee ajjaj

  • yes that is the container for the code.

  • 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!.

  • Dude, I did the same exact thing, on Notepad++ but it still didn't work.

  • 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.');

    }

  • hi you did not use braces () to the if condition so it is not working .

  • dude put you brackets before like this:

    If (password==123)

  • Thanks for the clarification!

  • You are awesome!

  • thank you man

     now i learned some basic of javascript

  • hey stevo

  • lmfao at "who the f r u" so funny LOL

  • I don't understand what program you're writing that in that colors the text. Tell me, please?

  • 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 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.

  • haha nevermind i just watched the tutorial again, i gotcha now

  • hello bobny

  • bobny? i dont get it

  • its one of the names you choose as an example.

  • @thenewboston hes pointing out u misspelled "bobby" as "bobny"

  • @thenewboston lol......

  • @thenewboston

    i think he's drunk

  • There is only one option: to alert "who the f r u" lololol! great tut helped me out in js and in glovepie scripting!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more