loading
index.js
1
2
3
4
5
6
7
8
9
10
let hideEmails = function(string) {
    return string
      .replace(
        /[email protected]/g, 
        '#####')
}

let exampleSentence = "I added the e-mails [email protected] and [email protected] to the database"

console.log(hideEmails(exampleSentence))
node v10.16.0