You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: 19_Iterations/5_for_of_loop.js
-1
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,6 @@
16
16
// Note
17
17
// - The order of iteration is guaranteed.
18
18
// - Not recommended to use on object.
19
-
// - Unlike traditional for loops, for...of doesn't give you access to the current index directly. If you need the index, you can use a combination of for...of with a traditional for loop (nested or with an index counter).
20
19
// - The for...of loop doesn't modify the original iterable object. It iterates over a copy of the values.
Copy file name to clipboardexpand all lines: 19_Iterations/7_for_each.js
+2
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,8 @@ array1.forEach((element) => {
56
56
57
57
// Note
58
58
// - The forEach() method accepts a callback function as its argument, which is invoked for each element in the array. The callback function takes three parameters: the current element being processed, the index of the current element, and the array or array-like object being iterated.
59
+
60
+
59
61
// - The forEach() method in JavaScript doesn't return a value itself. Here's a breakdown of why:
0 commit comments