Skip to content

Commit 0a9896d

Browse files
committed
change variable name to element
1 parent 4312a67 commit 0a9896d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎Sprint-1/refactor/includes.js‎

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

33
function includes(list, target) {
4-
for (let i of list) {
5-
if (i === target) {
4+
for (let element of list) {
5+
if (element === target) {
66
return true;
77
}
88
}
99
return false;
1010
}
1111

1212
module.exports = includes;
13+
14+

0 commit comments

Comments
 (0)