Remove a word from a string

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

Answers:

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

yes, you can, using .replace() method

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.