With the help of JavaScript replace function, It will replace the string like with love.. Here is the syntax
replace function
str.replace(/like/g, "love");