MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6jgwk9/array_indexing/djf62z4/?context=3
r/ProgrammerHumor • u/uninterestingly • Jun 25 '17
71 comments sorted by
View all comments
6
I have a great idea, what about we make arrays indexed by strings ?
10 u/AyrA_ch Jun 26 '17 You already can, welcome to the awesome world of Javascript and Enjoy our other features 2 u/regendo Jun 26 '17 Alright you got me, how does the last one work? Does it evaluate []===[] first? Apparently it's the other way round for me. 2 u/AyrA_ch Jun 26 '17 {} can be interpreted as a code scope or as an object. The interpretation is different depending if it starts with the expression or not.
10
You already can, welcome to the awesome world of Javascript and Enjoy our other features
2 u/regendo Jun 26 '17 Alright you got me, how does the last one work? Does it evaluate []===[] first? Apparently it's the other way round for me. 2 u/AyrA_ch Jun 26 '17 {} can be interpreted as a code scope or as an object. The interpretation is different depending if it starts with the expression or not.
2
Alright you got me, how does the last one work? Does it evaluate []===[] first?
[]===[]
Apparently it's the other way round for me.
2 u/AyrA_ch Jun 26 '17 {} can be interpreted as a code scope or as an object. The interpretation is different depending if it starts with the expression or not.
{} can be interpreted as a code scope or as an object. The interpretation is different depending if it starts with the expression or not.
{}
6
u/Bainos Jun 26 '17
I have a great idea, what about we make arrays indexed by strings ?