The result is the inverse of what I expected?

Because the variable isSoccerFan = false it should produce the output of “No goal!”

let isSoccerFan = false;

if (isSoccerFan = true) {
} else {
  	console.log('No goal!');

Use the comparison operator, ===, or, since the value is a boolean,

if (isSoccerFan) {


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.