• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

if…else

JavaScript 1.0+, ECMAScript 1.0+, JScript 1.0+ Nav2+, NES2+, IE 3+, Opera3+ Syntax

if(statement){
  code;
}else(statement){
  code;
}

Description

The if…else statement is used to perform logic statements on specific cases. If statement is satisfied, its statements are executed. Otherwise, the else statement is evaluated. When statement evaluates to true, code is executed.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint