if

  • Updated

If statements provide support for conditional branching and flow control. As in most languages, if statements can be followed by an optional else statement, executed if the original condition is not met.

var x = 10;

if( x < 100 )
{
x = x * 100;
}
else
{
x = x + 4.5;
}

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.