What does this exclamation mark mean in Javascript?

Leo Jiang
function F() {
    w = !0;
    return !1
}

Is this a special way of setting a boolean variable? Why did the author do this?

Edit: Context:

document.onmousedown = F;
stavarotti

This is an example of unnecessary prowess. The code below is exactly the same:

function F() {
    w = true; //w = !0;
    return false //return !1
}

If you are using a good minification tool, which you should in production, clever programming to save a few bytes becomes unnecessary.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

What does an exclamation mark before a variable mean in JavaScript

From Java

What does an exclamation mark mean in the Swift language?

From Dev

What does the exclamation mark mean for a swift initializer?

From Dev

What does an exclamation mark mean in diff output?

From Dev

What does the exclamation mark mean in udev rule?

From Dev

What does an exclamation mark before a cell reference mean?

From Dev

What does the exclamation mark after a SASS import mean?

From Dev

What does the exclamation mark mean in git config alias?

From Dev

ES6 imports - what does the exclamation mark mean?

From Dev

What does exclamation mark mean inside Intern's define?

From Dev

What does the red exclamation mark in my layout file mean?

From Dev

What does exclamation mark mean inside Intern's define?

From Dev

What does an exclamation mark mean in the Windows 8.1 Mail App?

From Dev

What does the red exclamation mark in my layout file mean?

From Dev

what is the Exclamation mark mean in eclipse ? android project

From Dev

What does the "?" (question mark) mean in javascript?

From Java

What does exclamation mark mean before invoking a method in C# 8.0?

From Dev

What does the exclamation mark mean in big-o, i.e. O(X!)?

From Dev

What does the red exclamation mark next to English (language dropdown) mean in iTunes Connect?

From Java

What does the exclamation mark do before the function?

From Dev

What does an exclamation mark in Lua do?

From Dev

What does the exclamation point mean in a trait implementation?

From Dev

What does question mark mean?

From Dev

What does %-mark mean in Clojure?

From Dev

javascript - encodeUriComponent with exclamation mark?

From Dev

What does typing a single exclamation mark do in Bash?

From Dev

What does the exclamation mark before class path do in ProGuard?

From Dev

What does typing a single exclamation mark do in Bash?

From Dev

What is the simplest way to prefix all strings in an array with a "!" (exclamation mark) in javascript?

Related Related

  1. 1

    What does an exclamation mark before a variable mean in JavaScript

  2. 2

    What does an exclamation mark mean in the Swift language?

  3. 3

    What does the exclamation mark mean for a swift initializer?

  4. 4

    What does an exclamation mark mean in diff output?

  5. 5

    What does the exclamation mark mean in udev rule?

  6. 6

    What does an exclamation mark before a cell reference mean?

  7. 7

    What does the exclamation mark after a SASS import mean?

  8. 8

    What does the exclamation mark mean in git config alias?

  9. 9

    ES6 imports - what does the exclamation mark mean?

  10. 10

    What does exclamation mark mean inside Intern's define?

  11. 11

    What does the red exclamation mark in my layout file mean?

  12. 12

    What does exclamation mark mean inside Intern's define?

  13. 13

    What does an exclamation mark mean in the Windows 8.1 Mail App?

  14. 14

    What does the red exclamation mark in my layout file mean?

  15. 15

    what is the Exclamation mark mean in eclipse ? android project

  16. 16

    What does the "?" (question mark) mean in javascript?

  17. 17

    What does exclamation mark mean before invoking a method in C# 8.0?

  18. 18

    What does the exclamation mark mean in big-o, i.e. O(X!)?

  19. 19

    What does the red exclamation mark next to English (language dropdown) mean in iTunes Connect?

  20. 20

    What does the exclamation mark do before the function?

  21. 21

    What does an exclamation mark in Lua do?

  22. 22

    What does the exclamation point mean in a trait implementation?

  23. 23

    What does question mark mean?

  24. 24

    What does %-mark mean in Clojure?

  25. 25

    javascript - encodeUriComponent with exclamation mark?

  26. 26

    What does typing a single exclamation mark do in Bash?

  27. 27

    What does the exclamation mark before class path do in ProGuard?

  28. 28

    What does typing a single exclamation mark do in Bash?

  29. 29

    What is the simplest way to prefix all strings in an array with a "!" (exclamation mark) in javascript?

HotTag

Archive