Using If statement to filter data with multiple string values
i want to sort the file extension in one line because if i dont do that i have to write multiple lines of code which i think is a waste of time. can i get some help here
if (fileExtension === "jpg"||"Jpeg"||"png"||"svg"){
//do something
}
else{
//do something else
}
if have so file extension jpg then its directly switching to else statement and if i give just jpg i.e if (fileExtension === "jpg")
then the code runs fine i want to use multiple.