From e3a7c8e6ea4b9e2dff7794aa981ee6b6bb6f7fe3 Mon Sep 17 00:00:00 2001 From: sohamsshah Date: Sat, 28 Oct 2023 02:02:36 +0530 Subject: [PATCH] feat: add a comment --- Snippets/FunctionalProgramming/General/arrayLength.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Snippets/FunctionalProgramming/General/arrayLength.js b/Snippets/FunctionalProgramming/General/arrayLength.js index bc17b1a..b1fd1e6 100644 --- a/Snippets/FunctionalProgramming/General/arrayLength.js +++ b/Snippets/FunctionalProgramming/General/arrayLength.js @@ -1,3 +1,5 @@ +// finds array length + function arrayLength(arr){ let len = 0; while(arr[len] !== undefined){