DEV Community

Discussion on: April 9th, 2021: What did you learn this week?

Collapse
 
juniordevforlife profile image
Jason F • Edited

I used the !! operator for the first time. I used it in a ternary and it looks something like this:

const myValue = !!thing.val ? thing.val : '';

Collapse
 
nickytonline profile image
Nick Taylor • Edited

Boolean magic!

Shia LeBoeuf in character saying "Magic!"