MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/a6txtp/coming_from_python_to_js/ebz25zg/?context=3
r/javascript • u/chroner • Dec 16 '18
const print = console.log
I found my safe space.
156 comments sorted by
View all comments
Show parent comments
0
[deleted]
16 u/Earhacker Dec 17 '18 for loops are for dirty Python casuals. Over here in JavaScript we use Array.prototype.forEach.(but sure, we use your fornum loop sometimes too) 4 u/mrbojingle Dec 17 '18 eww. map ftw! Unless you want to run print, then forEach away! 2 u/Earhacker Dec 17 '18 They’re not exactly interchangeable
16
for loops are for dirty Python casuals. Over here in JavaScript we use Array.prototype.forEach.
for
(but sure, we use your fornum loop sometimes too)
fornum
4 u/mrbojingle Dec 17 '18 eww. map ftw! Unless you want to run print, then forEach away! 2 u/Earhacker Dec 17 '18 They’re not exactly interchangeable
4
eww. map ftw! Unless you want to run print, then forEach away!
2 u/Earhacker Dec 17 '18 They’re not exactly interchangeable
2
They’re not exactly interchangeable
0
u/[deleted] Dec 16 '18
[deleted]