JavaScript – How to Remove a Word from a String

javascriptstring

i want to remove a particular #keyword from a string. i dont know its position or anything.
can i use javascript to do it?

Best Answer

var str = "particular #keyword";
str.replace("keyword", "new");
alert(str); //-> "particular #new"