In python you can check whether an object is in list or not by doing:
cars = ["bmw","nissan","toyota"]
car = "bmw"
if car in cars:
print(car)
in this case, this will print
bmw
which means True, I was wondering how i can do such in JavaScript?