js loop each letter on a new line code example Example: js for each character in string for (var i = 0; i < str.length; i++) { alert(str.charAt(i)); }