Ternary operators in JavaScript
Ternary operators are also known as conditional operators. Basically, they put an if else statement onto one line.
With these examples I've put them in a codepen, to make them easy to test. Feel free to use it to have a play. In the HTML I just have ...
blog.nicm42.me.uk4 min read