I am trying to get 3 conditions in one if . But it's not working

I need to match three conditions so that the page can show the appropriate result for that filters. I tried adding the && between three of the conditions but it doesn’t work.
I am not revealing the real code here, but I’ve shown it without the original var names.

if(localStorage.getItem("eg1") == 30000 &&  eg2 == 1 &&   eg3 == use){};

eg2 and eg3 are just variables, they are not localstorage.

Leave a Comment