replaceAll

Javascript function to replace all of the given character in a string.