String.prototype.replaceAll() not working

There is no replaceAll in JavaScript: the error console was probably reporting an error.

Instead, use the /g (“match globally”) modifier with a regular expression argument to replace:

const a = "::::::";
const replaced = a.replace(/:/g,"hi");
console.log(replaced);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)