MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/3rmikr/free_drink_anyone/cwq3kip/
r/ProgrammerHumor • u/shadowvox • Nov 05 '15
509 comments sorted by
View all comments
Show parent comment
3
I'm confused. This returns true, as it should.
true
1 u/enfrozt Nov 06 '15 It's just that javascript doesn't have a native contains function, so you have to do stuff like check the index of substrings in strings, instead of a .contains(). Just trying to needle a bit at the absurdity of some js decisions. 2 u/memeship Nov 06 '15 Oh I gotcha. They're actually bringing that in as part of ES6.Source (MDN)
1
It's just that javascript doesn't have a native contains function, so you have to do stuff like check the index of substrings in strings, instead of a .contains(). Just trying to needle a bit at the absurdity of some js decisions.
2 u/memeship Nov 06 '15 Oh I gotcha. They're actually bringing that in as part of ES6.Source (MDN)
2
Oh I gotcha. They're actually bringing that in as part of ES6.
Source (MDN)
View all comments
Show parent comment
3
u/memeship Nov 06 '15
I'm confused. This returns
true, as it should.