mardi 28 janvier 2020

What does !() mean in javascript

I just saw this construction for the first time in javascript

if (someConditionIsMet && !(anotherCondition && oneMoreCondition)) {
  return something
}

There is a !() inside of the if-conditional statement. I'm wondering what exactly that does. Is it just a way of grouping several conditions together and making sure they all evaluate a certain way before triggering logic? If so, is this merely to simplify the appearance or is there some logical advantage here?

Aucun commentaire:

Enregistrer un commentaire