I noticed that Javascript inbuilt replace function cannot replace more that one particular character at a go.
I have a String say var word = "sony sony sony is good"
but when i want to replace all sony with apple.
var res = word .replace("sony", "apple");
I notice it doesnt replace all sony, rather it replaces them one after the other.
How can I make javascript , change all instance of a string to another at once ?