Did You Know This JavaScript Trick? (Logical Assignment)
dcode dcode
135K subscribers
8,168 views
633

 Published On Feb 17, 2022

In today's video we'll be taking a look at Logical Assignment in JavaScript which lets you re-assign a variable depending on if it's truthy, falsy or nullish.

This is particularly useful when trying to set default values and avoids having to use a IF statement.

For your reference, check this out:
https://developer.mozilla.org/en-US/d...

🏫 My Udemy Courses - https://www.udemy.com/user/domenic-co...
🎨 Download my VS Code theme - https://marketplace.visualstudio.com/...
💜 Join my Discord Server -   / discord  
🐦 Find me on Twitter -   / dcodeyt  
💸 Support me on Patreon -   / dcode  
📰 Follow me on DEV Community - https://dev.to/dcodeyt
📹 Join this channel to get access to perks -    / @dcode-software  

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

#dcode #javascript

show more

Share/Embed