How To Use The Ternary Operator in JavaScript
In JavaScript, there is a thing called the ternary operator. It’s a fancy term for a shorthand way to write an if statement. To compare and contrast let’s take a look at the long way of creating an if statement: if(x==1){ alert(“There is ” + …