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 ...
This week I learnt...
Front End Developer. I like problem solving and making things pretty. I also like red.
Markdown supported · ⌘↵ to post
No responses yet.