Tag Archives: javascript control statement

5.5.7 for.. in Statement

The for … in statement is used to loop (iterate) through the elements of an array or through the properties of an object.  The code in the body of the for .. in loop is executed once for each element/property. Syntax: For(variable in object) {         Code to be executed } Example: <html> <body> <script


5.5.2 Nested If..else

If (condition1) { Code to be executed if condition 1 is true } else if (condition2) { Code to be executed of condition 2 is true } else { Code to be executed if condition 1 and condition 2 are not true } • If there is several levels of indentation, each level should be


5.5.1 If…else Statements

If…else  statement performs an indicated action only when the condition n evaluates to true; otherwise that action is skipped.  The if…else selection statement allows you to specify that a different action is  to be performed when the condition is true than when the condition is false. Syntax If (condition) { Code to be executed if


5.5 Control statements

In the language of programming, the kinds of statements that make decisions and loop around to repeat themselves are called control structure. A control structure directs the execution flow through a sequence of script statements based on simple decisions and other factors. JavaScript supports all control structures that are supported by programming languages such as


  • Email Subscription

    Sign-up for our email newsletter and get free job alerts, current affairs and GK updates regularly.

    Subscribe Here

  • Twitter Followers

    1338 people follow tut2learn
    Rachna997136829 Rachna99 DeepakS66027410 DeepakS6 kavadmayur7 kavadmay RenuKhurdi RenuKhur pandim955 pandim95 HinnariyaNeeraj Hinnariy
Popup Dialog Box Powered By : XYZScripts.com
  • RSS
  • Facebook
  • Google+
  • Twitter