From 1986ad1c38cb94866f84349c79735231e4c4233f Mon Sep 17 00:00:00 2001 From: Arunkumar1712 <116170537+Arunkumar1712@users.noreply.github.com> Date: Thu, 4 Jan 2024 18:02:21 +0530 Subject: [PATCH] Code to find the length of the string Code to find the length of the string without using length method --- string length.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 string length.js diff --git a/string length.js b/string length.js new file mode 100644 index 0000000..52d0df5 --- /dev/null +++ b/string length.js @@ -0,0 +1,8 @@ +var a ="asmnjncjcnec"; +var ans=0; +while(a[ans]!==undefined){ + ans+=1; + +} +console.log(ans) +