Created
August 1, 2014 12:23
-
-
Save joa/129a79422314f7fc22b1 to your computer and use it in GitHub Desktop.
Little JavaScript gem I found
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// what does the following code print? | |
// | |
// a) false, true | |
// b) true, true | |
// c) true, false | |
// d) none of the above | |
console.log(new Option() instanceof HTMLOptionElement) | |
console.log(new HTMLOptionElement() instanceof HTMLOptionElement) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Same result with
Image
andHTMLImageElement
.Had experienced it today 😉