17 Pro JavaScript tricks you didn’t know
<h1>JavaScript : Tricks You Should Know</h1>
<h1>The ternary operator</h1>
<p>Noobs:</p>
<pre>
let hungry = true;
let eat;
if (hungry === true) {
eat = 'yes';
} else {
eat = 'no';
}</pre>
<p>Pro:</p>
<pre>
let hungry = true;
let eat = hungry === true ? 'yes' : 'no';</pre>
<p><a href="https://medium.com/javascript-in-plain-english/17-pro-javascript-tricks-you-didnt-know-b419c018dd19"><strong>Read More</strong></a></p>