xxxxxxxxxx
var string = "progress report tempate elementary school"
string = string.split(" ");
for (let i = 0; i < string.length ; i++) {
for (let j = 0; j < string[i].length-1; j++) {
if (string[i][j] === string[i][j+1]) {
dgrg = string[i].split("").splice(j,j+1).join("")
console.log(dgrg);
}
}
}
console.log(string);
xxxxxxxxxx
var str = "Hello World";
str = str.slice(0, 3) + str.slice(4);
console.log(str)
xxxxxxxxxx
var str = "Hello World";
str = str.slice(0, 3) + str.slice(4);
console.log(str)
Run code snippetHide results