JavaScript Null Equality Panic
> document.all HTMLAllCollection(2784) [html.gr_reddit style, style, style, style, style, styl link, link, link, link, link, link, link meta, meta, meta, meta, meta, meta, meta link, meta, meta, meta, meta, script, sc style#cliqz-adblocker-css-rules, link, s div#ghostery-purple-box.ghostery-bottom... > document.all instanceof Object; true > typeof document.all "undefined" > document.all === undefined false > document.all == null true No matter what comes through that gate, you will stand your ground. RUN
A JavaScript console shows the bizarre behavior of document.all: it is an object, typeof reports "undefined", strict comparison with undefined is false, and loose comparison with null is true. The code is paired with Gandalf declaring that nothing will get through the gate, followed by a panicked running reaction, joking about JavaScript's infamous historical quirks and the need to escape them. EN: A JavaScript console shows the bizarre behavior of document.all: it is an object, typeof reports "undefined", strict comparison with undefined is false, and loose comparison with null is true. The code is paired with Gandalf declaring that nothing will get through the gate, followed by a panicked running reaction, joking about JavaScript's infamous historical quirks and the need to escape them.
- @dev_meme / 69 2019-02-07
- Type
- image
- Size
- 800×798 · 110.4 KiB
- Mood
- sarcastic, absurd
- Language
- en
- Added