javascript if statement alternative code example
Example 1: javascript if statement alternative
//(condition)&&(runThisIfTheConditionWasTrue)
// E.G.
5 * 5 === 25 && console.log("horray"); //horray
5 * 1 === 25 && console.log("horray"); //returns false
Example 2: if alternative javascript
let count === 0 ? "zero" : count;
//this means: if count = 0 then count = "zero"