Words = {
"banana":"Lion",
"apple":"Dog",
};
var string = "banana apple";
How do i make it so that, “banana” is replaced by “Lion”, and “apple” is replaced by “Dog”, case-insensitive in JS?
I also want it so that if new words are added to the “Words” array, they will also be replaced if found in the String variable.