Skip to content

Commit 64d8a4a

Browse files
committed
function fix
1 parent 8d1cad5 commit 64d8a4a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Sprint-1/refactor/includes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Refactor the implementation of includes to use a for...of loop
2-
32
function includes(list, target) {
4-
for (let index = 0; index < list.length; index++) {
5-
const element = list[index];
3+
for (const element of list) {
64
if (element === target) {
75
return true;
86
}
@@ -11,3 +9,5 @@ function includes(list, target) {
119
}
1210

1311
module.exports = includes;
12+
13+

0 commit comments

Comments
 (0)