var value = "alma";
var new_value = [...value].map((x) => x+"E").join("")
let str = 'This is my string';
for(let character of str)
console.log(character)
for (var i = 0; i < str.length; i++) {
alert(str.charAt(i));
}
for (var i = 0; i < str.length; i++) {
alert(str[i]);
}
var i = str.length;
while (i--) {
alert(str.charAt(i));
}
var i = str.length;
while (i--) {
alert(str[i]);
}
let result = '';
str.split('').forEach(letter => {
result += letter;
});
var result = '';
for (var letterIndex in str) {
result += str[letterIndex];
}