wtfjs
Зеркало из https://github.com/denysdovhan/wtfjs
ФоркИзбранное
0
0
Описание
Языки
- JavaScript97,1%
- Shell2,9%
4 года назад
4 года назад
9 лет назад
9 лет назад
6 лет назад
9 лет назад
5 лет назад
4 года назад
месяц назад
4 года назад
6 лет назад
4 года назад
4 года назад
4 года назад
месяц назад
4 года назад
4 года назад
4 года назад
What the f\ck JavaScript?
Node Packaged Manuscript
Translations
Table of Contents
💪🏻 Motivation
✍🏻 Notation
👀 Examples
`[]` is equal `![]`
`true` is not equal `![]`, but not equal `[]` too
true is false
baNaNa
`NaN` is not a `NaN`
`Object.is()` and `===` weird cases
It's a fail
`[]` is truthy, but not `true`
`null` is falsy, but not `false`
`document.all` is an object, but it is undefined
Minimal value is greater than zero
function is not a function
Adding arrays
Trailing commas in array
Array equality is a monster
`undefined` and `Number`
`parseInt` is a bad guy
Math with `true` and `false`
HTML comments are valid in JavaScript
Chaining assignments on object
Accessing object properties with arrays
`Number.toFixed()` display different numbers
`Math.max()` less than `Math.min()`
Comparing `null` to `0`
Same variable redeclaration
Default behavior Array.prototype.sort()
resolve() won't return Promise instance
`{}{}` is undefined
`arguments` binding
An `alert` from hell
An infinite timeout
A `setTimeout` object
Double dot
Extra Newness
Why you should use semicolons
Split a string by a space
A stringified string
Non-strict comparison of a number to `true`
📚 Other resources
🤝 Supporting
🎓 License
README.md