Created
December 17, 2013 00:21
-
-
Save meandavejustice/7997704 to your computer and use it in GitHub Desktop.
create arr, add an attribute with dot notation. wat?
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
> var arr = [] | |
undefined | |
> arr | |
[] | |
> arr.keyName = true | |
true | |
> arr | |
[ keyName: true ] | |
> arr[0] | |
undefined | |
> arr.keyName | |
true | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use it, eg, for paged collections. JavaScript collections, especially <ES6, are fairly assumption-rich and feature-poor compared to other languages, imo.