Compare Revisions

Statements (Control Flow)

Revision 418555:

Revision 418555 by Sheppy on

Revision 429705:

Revision 429705 by iskitz on

Title:
Statements (Control Flow)
Statements (Control Flow)
Slug:
Web/JavaScript/Guide/Statements
Web/JavaScript/Guide/Statements
Tags:
"statements","JavaScript"
"statements","JavaScript","control statements"
Content:

Revision 418555
Revision 429705
n100      To execute multiple statements, use a block statement (<codn100      To execute multiple statements, group them within a block s
>e>{ ... }</code>) to group those statements. In general, it is a >tatement (<code>{ ... }</code>) . In general, it's good practice 
>good practice to always use block statements, especially in code >to always use block statements, especially when nesting&nbsp;<cod
>involving nested <code>if</code> statements:>e>if</code> statements:
n104  statements_1n104  statement_1_runs_if_condition_is_true
105  statement_2_runs_if_condition_is_true
n106  statements_2n
107}
tt108    <div>
109      &nbsp; statement_3_runs_if_condition_is_not_true
110    </div>
111    <div>
112      &nbsp; statement_4_runs_if_condition_is_not_true
113    </div>
114    <p>
115      }
116    </p>

Back to History