Igor Jort,
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script>
let replaceWords = new Map();
replaceWords.set(".w", "with");
function testings() {
let result = out.value;
for(let [key, value] of replaceWords) {
result = result.replace(key, value);
}
out.value = result;
};
</script>
</head>
<body>
<input type="text" id="out" value="Caesar Salad .w Chicken">
<button onclick="testings()" type="button">кнопка</button>
</body>
</html>