DEV Community

Cover image for 20 Lesser-known Javascript Features that You Probably Never Used

20 Lesser-known Javascript Features that You Probably Never Used

Syakir on July 11, 2024

Read post in original url https://devaradise.com/lesser-known-javascript-features for better navigation JavaScript is a cornerstone of modern web ...
Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

!! Bang Bang Operator

There is no such operator, you are merely using the logical not operator (!) twice. Describing it as a single operator merely serves to create misunderstanding as to what is actually going on.

Collapse
 
syakirurahman profile image
Syakir • Edited

Officially, if we only refer to MDN docs, you are right. Its not a new operator. Its just a double NOT operator. But not everyone knows that we can do this, hence i include it here 😀

Collapse
 
giovannimazzuoccolo profile image
Giovanni Mazzuoccolo

Regarding the name "Bang", as @webjose refer to western movies, here is the truth:

In the 1950s, secretarial dictation and typesetting manuals in America referred to the mark as "bang", perhaps from comic books – where the ! appeared in dialogue bubbles to represent a gun being fired – although the nickname probably emerged from letterpress printing. This "bang" usage is behind the names of the interrobang, an unconventional typographic character, and a shebang, a feature of Unix computer systems. In hacker culture, the exclamation mark is called "bang", "shriek"

en.wikipedia.org/wiki/Exclamation_...

Thread Thread
 
syakirurahman profile image
Syakir

Thank you for the trivia 😄

Collapse
 
webjose profile image
José Pablo Ramírez Vargas

At least rename it to "double negation operators". Bang Bang?? Are we in a western movie? That's messed up. LOL.

Thread Thread
 
syakirurahman profile image
Syakir

If you search in google using that keyword, many people actually call it that way.. i didnt invent that word 😂

Thread Thread
 
syakirurahman profile image
Syakir

But hey, lets focus on its function instead of how we should call it, shall we? 😀

Collapse
 
marcinheniborg profile image
marcinheniborg

This list is great. Thanks @syakirurahman

Collapse
 
syakirurahman profile image
Syakir

You're welcome. hope it helps! 😄

Collapse
 
snook profile image
Ryan Snook

Thank you, I learned some things to start utilizing more 😀

Collapse
 
syakirurahman profile image
Syakir

No problem.. Tell me what you learn from here? 😄