1 of 3

Use conditional shorthands:

if(a == 2){
    some code gets executed...;
     } else {
    some other code gets executed...;
     }

can be abbreviated to this:

(a == 2 ? some code : some other code);

Shorter, huh?