Broken


#1

https://www.codecademy.com/courses/learn-javascript/lessons/loops/exercises/while?action=lesson_resume

I followed the first instruction, pressed run, I did it wrong. I check it, nothing wrong everything is correct. So I think: "Well this has happened to me before but usually if I do the next one and they are both right, it checks them both off." So I do the next one, press run, loading, loading, loading, loading, loading, loading.... I leave it for a while, still loading. I try it in a different browser, still loading. I try refreshing the page, resetting exercise, logging out and logging back in again, finding an answer on Google, nothing. Everything I try: LOADING. I waited a few days and tried it again, loading.

var cards = ['Diamond', 'Spade', 'Heart', 'Club'];
var currentCard = 'Heart';
while(currentCard !== 'Spade'); {
  console.log(currentCard);
  var randmoNumber = 
Math.floor(Math.random() * 4);
  currentCard = cards[randomNumber];
}
console.log('Found a spade');

#2

randmo?

There is also unnecessary semi colon here.


#3

Well, for some reason it was just loading and loading and not telling me it was wrong but thank you SO much it works now and I can get back to coding regularly! thank you!


#4

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