You need to sum up a list of numbers in JavaScript. Which one do you prefer? 🤔
149
77
751
This is gonna drive someone up the wall, but... let sum = 0; for (let p of points) { sum = sum + p; } 😄
1
0
2
For-in is a worse option because that could bring in non-indexded properties of the array.
1
0
1
Replying to @Paceaux
I think I went too far this time

12:30 PM · Jun 30, 2020

1
0
0
Replying to @Ceige_M @Paceaux
Ah, I forgot to write p = p + points[p] but then you'd just get "abanana" and at this point of wrongness I don't think it matters
0
0
1