+ 8
replace :- if (foodi == " indian food") with:- if (foodi == "indian food") There was a space between " and i. Also i recommend using numbers like 1 for indian ,2 for international because indian food is not equal to Indian food(case-sensitive)
7th Apr 2017, 10:36 AM
Meharban Singh
Meharban Singh - avatar
+ 5
try using :- var x="indian food"; if(foodi==x)
7th Apr 2017, 10:55 AM
Meharban Singh
Meharban Singh - avatar
+ 1
If you use space inside of " " then it does matter, same as "Somewords" is not the same as "Some words". But if you use it outside of " " then usually it doesn't matter.
7th Apr 2017, 10:45 AM
Dextozz
Dextozz - avatar