DEV Community


Discussion on: Prevent Object Retrieval TypeError with &&

tdubs profile image
Thom W

I always felt using the && operator in this manner was an unintentional. And that its a quirk of JS. Like it should only be used in the if statement. Nevertheless it's super useful.

samanthaming profile image
Samantha Ming Author

Definitely something to keep in your toolkit. Even if you don’t use it. If you ever come across that code, at least you will be able to follow what other people are trying to do 😊