6/8 Issue


#1

Okay, I am stuck on the second part of the 6th script in JavaScript. The instructions want me to make it so that the while loop will activate if the current card is NOT equal to Spades. This is the code I made so far:
let cards = [‘Diamond’, ‘Spade’, ‘Heart’, ‘Club’];

let currentCard = ‘Spade’

while (currentCard ==! ‘Spade’) {
break
}

However, upon executing the code, I get this error message:
“Did you check if currentCard is equal to ‘Spades’?”

I did everything right from what I can see, but it’s not working. Any Help?

(Note: There’s a break because it’s a placeholder for future code.)


#2

The not equal operator is written,

!==

#3

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