4 ms·
lol, after reading the article I came back in here to call out that exact same chunk of code and the exact same sad face. I will agree, however for small thing
by ryankshaw 15y ago
lol, after reading the article I came back in here to call out that exact same chunk of code and the exact same sad face. I will agree, however for small things the ternary operator is prettier than the if...then...else... syntax
thing[conditional ? 'show' : 'hide']();
instead of:
thing[if conditional then 'show' else 'hide']()