Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Shorten simple if statements

...

Instead of:

Do:

var myResult;
if (#var1==1) myResult=true;
else myResult=false;

var myResult = #var1==1 ? true : false;