<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
my code will not run. when I click “run”, it keeps on showing as “loading” (the circle/spinning sign) but never completes loading. there is no error message because the code won’t finish running.
```
var cards = [‘Diamond’, ‘Spade’, ‘Heart’, ‘Club’];
var currentCard = ‘Heart’;
while (currentCard !== ‘Spade’); {
console.log(currentCard);
Your code is creating an infinite loop, that is why the circle keeps spinning and never complete.
You have an extra semicolon:
while (currentCard !== 'Spade'); { // <=== look here
Explanation:
Even though it’s just one extra semicolon, what it does will change your code significantly. Basically, the semicolon acts like a full stop in a sentence, causing your code block (after the while condition), the code in the curly bracket { } not executing at all. Hence, the currentCard is always 'Heart' and the loop will keep looping forever.
Remove that semicolon, that should work. Cheers
Side note: If you have more questions in future, it’s good to know how to format your code in the post so that it’s easier for others to offer their help. You can refer how to format code here.