Last active
August 29, 2015 13:58
-
-
Save kcjpop/9982753 to your computer and use it in GitHub Desktop.
Some JavaScript notes
This file contains 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
// Check existence of a property | |
Object.prototype.hasOwnProperty.call(obj, keyToBeChecked); | |
// Create a new object that inherits from a null prototype | |
var registry = Object.create(null); | |
// So this could yield `true` | |
!registry['hasOwnProperty']; | |
// Source: http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment