← Back to challenges

Recreating the String.length Property

JavaScriptHardloopslanguage_fundamentalsarrays

Instructions

Create a function which returns the length of a string, WITHOUT using String.length property.

Examples

length("Hello World") ➞ 11

length("Sample") ➞ 6

length("wash your hands!") ➞ 16

Notes

N/A

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Burrrrrrrp