Articles → JavaScript → Replace Function In Javascript
Replace Function In Javascript
Purpose
Example
<html><head><title>Replace demo</title><script>
var message = "Hello Gyan";
message = message.replace("Gyan", "Gyansangrah");
alert(message);
</script></head><body></body></html>
Output