From ba5ecbebae91e874c4ae3e095b5897559a92ebea Mon Sep 17 00:00:00 2001 From: Dagim-Daniel Date: Mon, 27 Jul 2026 15:16:24 +0100 Subject: [PATCH] task under sprint 1 refactor is done --- Sprint-1/refactor/includes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-1/refactor/includes.js b/Sprint-1/refactor/includes.js index 29dad81f0..802cb86af 100644 --- a/Sprint-1/refactor/includes.js +++ b/Sprint-1/refactor/includes.js @@ -1,12 +1,12 @@ // Refactor the implementation of includes to use a for...of loop function includes(list, target) { - for (let index = 0; index < list.length; index++) { - const element = list[index]; + for (const element of list) { if (element === target) { return true; } } + return false; }