Skip to content

Commit 7f0d8f5

Browse files
completed-refactor
1 parent 1b87061 commit 7f0d8f5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Sprint-1/refactor/includes.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
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 (let index = 0; index < list.length; index++) {
5+
// const element = list[index];
6+
for (const element of list) {
67
if (element === target) {
78
return true;
89
}

0 commit comments

Comments
 (0)