blob: 395db19ada70ea3346a4defd1845b2ce10b83aac (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
let str = "Perl Weekly Challenge";
let count = 0;
for(let i =0; i < str.length; i++){
if(str[i] === "e"){
count++;
str = str.replace("e", "E")
}
}
console.log(count)
console.log(str)
|