Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Javascript Tutorial - 8 - If Statement

Loading...

Sign in or sign up now!
46,021
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 12, 2008

visit www.thenewboston.com for all my tutorials!

  • likes, 2 dislikes

Link to this comment:

Share to:

Top Comments

  • wow im good with C++ AS2 and GML and this is so easy for me, its almost exactly the same

  • this guy is awesome, brilliant stuff, I don't need a course. Him and some books are doing just fine :P

see all

All Comments (92)

Sign In or Sign Up now to post a comment!
  • @konopie1337 i know hey this this is almost the same as c++ 

  • Dude, you're videos are awesome. holding my interest the longest out of all the paid/free video tutorials I've gone through.

  • for getting prompt with if statement and multiplying the result type this:

    var num1=5;

    var num2=5;

    var num3=prompt("Enter a number");

    var num4=prompt("Enter another number");

    if (num1==num2)

    {

    alert(num3*num4);

    }

  • it dont work. when i 1st start typing i get errors right away

  • Remember that a semi colon means that a statement is executed. In other words putting a statement after an if tells javascript that "if" is something is should do. SO only put " ; " semicolon after something that should be done, an action that should be taken by javascript. For example alert("Hello World.");

  • him

    and w3 schools

    are perfect combination

  • thanks for posting these awsome tutorials.......

  • awesm tutorial,,,,ur the best teacher,,,,dude

    i suggest u to put a playlist for this,,,,plzz

  • @ifthruim i think you could script out an Array command with many of your friends names and us if prompt= said names Hi Names

  • @UniversalHere

    var name1="bobby";

    var name2=prompt("enter a name");

    if (name1==name2)

    {

    alert("good job bobby!");

    }

    This should work if the comparison operator == is used in javascript

View all Comments »
Loading...

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