I\'m fairly new to JS, and realize length is considered a property. But I received a comment to not use str.length in a loop:
for (i=0; i
Strings are also immutable in JavaScript. The length property does not need to be computed each time it is accessed.
length
I created a jsperf benchmark for you to view here.
You'll notice the speeds are the same.