repl.it
@K0DYungDeku/

Replace Text with Array Words(from index)

Nodejs

No description

fork
loading
Files
  • index.js
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var ret = "Yo, how is it going my name is S. How was your day buddy. I'm still trying to find things out. I need to find out. I wil buy it all.";

valArray = ["out", "all"]


for (var i = 0; i < ret.length; i++) {
  for (var j = 0; j < valArray.length; j++){
    ret = ret.replace(new RegExp(valArray[j], "g"), "Yoo");
  }
}
console.log(ret);
  

Fetching token
?