Created
November 30, 2010 20:23
-
-
Save midu/722330 to your computer and use it in GitHub Desktop.
Remove an attribute from an object, so easy I could dance a jig
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
// Remove an element from an object | |
var kik = {"a": "lalala", "b": {"dom_thing": window}, "c": 42}; | |
> undefined | |
kik | |
> Object | |
a: "lalala" | |
b: Object | |
c: 42 | |
__proto__: Object | |
delete kik['a'] | |
> true | |
kik | |
> Object | |
b: Object | |
c: 42 | |
__proto__: Object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment