Skip to content

Commit 63f79bb

Browse files
committed
Completed exercise in refactor directory
1 parent 04c5cc3 commit 63f79bb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sprint-1/refactor/includes.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Refactor the implementation of includes to use a for...of loop
22

33
function includes(list, target) {
4-
for (let index = 0; index < list.length; index++) {
5-
const element = list[index];
4+
for (const element of list) {
65
if (element === target) {
76
return true;
87
}

0 commit comments

Comments
 (0)