Javascript How To Loop Through A String