Source string: A JavaScript tutorial with demo
Executing replace method:
var str_rep = src_str.replace("JavaScript","JS");
After replace method: