I want to know if there is a function in Javascript that can replace charater by another one.....ex:

var htmlcontent;
htmlcontent ="hello world";

htmlcontent= replace(htmlcontent,o,i);

alert(htmlcontent);




and I want the alert to show "helli wirld". Is there a function that can do that???