5 ms·
> for (let elem : arr) { ... } Do you mean: for (let elem of arr) { ... } Unless this is a joke about writing in Java & C++ (for which the colon syntax is
by JZumun 6y ago
> for (let elem : arr) { ... }
Do you mean:
for (let elem of arr) { ... }
Unless this is a joke about writing in Java & C++ (for which the colon syntax is valid) instead of javascript.