Hey I'm a beginner at javascript, and I've come across this issue. It seems like the IF statement recognizes the variable as something it isn't. I think it has something to do with the OR operator?
let variabel = `a variable with random value`;
if (variabel === `a` || `b`){
console.log(`the variable is the same as a or b`)
} else {
console.log(`not the same`)
}
So it does say the variable is the same as a or b
in the console. So the if statement is true? But it isn't?
The correct syntax is: