const firstWord = words.split(' ')[0];
const lastWord = words.split(' ')[1];
const firstWordIndex = words.indexOf(firstWord);
const lastWordIndex = words.indexOf(lastWord);
const intoPhrase = firstWord + ' ' + replacement + ' ' + lastWord;
const joinUp = phrase.join(intoPhrase)
console.log(joinUp)
}
Given a pricing: voiceAssistants - 9.99$, thermostats - 74.99$, lighting - 49.50$.
Expected total price: 40256.07$