javascript if without brackets code example
Example: javascript if without brackets
if (true)
alert("Condition is true");
else
alert("Condition is false");
// Only one line immediately under the if statement, or else its a syntax error.
if (true)
alert("Condition is true");
else
alert("Condition is false");
// Only one line immediately under the if statement, or else its a syntax error.