Meaning Exclamation Mark Javascript
Think of it.
Meaning exclamation mark javascript. What does the double exclamation mark mean. Next i ll show an example where i am sure value if non null but i need to tell it to the typescript explicitly. Scan files on user computer in node js.
Note that there s no semicolon. Actually it is two operators right next to each other. The exclamation point is part of javascript s logical operators and is called the unary negation operator or more simply logical not it negates the expression that follows it.
Is there even such an operator in javascript. The double exclamation mark in javascript basically means convert to boolean invert then invert again. This is just a function declaration.
You would need an invocation foo to actually run the function. Function foo note that there s no semicolon. Here is a function declaration.
Now when we add the seemingly innocuous exclamation mark. It is now a function. Var javascriptiscool true.
Typeof javascript static javascript is not a static language rather it is a dynamic language. If you have ever noticed a double exclamation mark in someone s javascript code you may be curious what it s for and what it does. The description contains many fancy words but in plain english it means.