Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Javascript and If Else statement

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 250
    Comment on it

    If else statement like any other computer language are used for condition. If the condition satisfies it goes for first statement and if it does not than it goes for the second statement.

    1.if is use to run a code if a condition is true.
    2.else is used to run a code if a condition is false
    3.else if used to run a code for a new condition if previous statement is false

    If statement

    if(a<b)
    {
    document.write(a);
    }
    


    else statement

    if(a<b)
    {
    document.write(a);
    }
    else
    {
    document.write(b);
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: