Replace a placeholder inside a string.

Replace Text

replace_text.js
const item = "tea";
const sentence = "Order: ITEM";
const message = sentence.replace("ITEM", item);
const clean = message.replace("Order: ", "");

console.log("item=" + item);
console.log("message=" + message);
console.log("clean=" + clean);
replace-text `replace` returns a new string with the first matching piece of text changed.