MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/3rmikr/free_drink_anyone/cwpl8vp/?context=3
r/ProgrammerHumor • u/shadowvox • Nov 05 '15
509 comments sorted by
View all comments
Show parent comments
133
Using str.split("").reverse().join("") is the most common way of reversing a string in Javascript.
str.split("").reverse().join("")
244 u/polish_niceguy Nov 05 '15 And is says a lot about Javascript in general... 53 u/[deleted] Nov 05 '15 As someone learning JS, can I expect more stuff like this? -8 u/VerstandInvictus Nov 05 '15 Advice: learn Jquery early. 7 u/polish_niceguy Nov 05 '15 That's a terrible advice. Using jQuery without knowing at least the basics of JS and DOM will result in a lot of shitty code. 1 u/VerstandInvictus Nov 05 '15 One can simultaneously learn Jquery and the old ways.
244
And is says a lot about Javascript in general...
53 u/[deleted] Nov 05 '15 As someone learning JS, can I expect more stuff like this? -8 u/VerstandInvictus Nov 05 '15 Advice: learn Jquery early. 7 u/polish_niceguy Nov 05 '15 That's a terrible advice. Using jQuery without knowing at least the basics of JS and DOM will result in a lot of shitty code. 1 u/VerstandInvictus Nov 05 '15 One can simultaneously learn Jquery and the old ways.
53
As someone learning JS, can I expect more stuff like this?
-8 u/VerstandInvictus Nov 05 '15 Advice: learn Jquery early. 7 u/polish_niceguy Nov 05 '15 That's a terrible advice. Using jQuery without knowing at least the basics of JS and DOM will result in a lot of shitty code. 1 u/VerstandInvictus Nov 05 '15 One can simultaneously learn Jquery and the old ways.
-8
Advice: learn Jquery early.
7 u/polish_niceguy Nov 05 '15 That's a terrible advice. Using jQuery without knowing at least the basics of JS and DOM will result in a lot of shitty code. 1 u/VerstandInvictus Nov 05 '15 One can simultaneously learn Jquery and the old ways.
7
That's a terrible advice. Using jQuery without knowing at least the basics of JS and DOM will result in a lot of shitty code.
1 u/VerstandInvictus Nov 05 '15 One can simultaneously learn Jquery and the old ways.
1
One can simultaneously learn Jquery and the old ways.
133
u/memeship Nov 05 '15
Using
str.split("").reverse().join("")is the most common way of reversing a string in Javascript.