Skip to content

Commit

Permalink
Code to find the length of the string
Browse files Browse the repository at this point in the history
Code to find the length of the string without using length method
  • Loading branch information
Arunkumar1712 authored Jan 4, 2024
1 parent 92c5e05 commit 1986ad1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions string length.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var a ="asmnjncjcnec";
var ans=0;
while(a[ans]!==undefined){
ans+=1;

}
console.log(ans)

0 comments on commit 1986ad1

Please sign in to comment.