This code doesn't work, and seems to make document.write stop working
I'm trying to make an array of a deck of cards the easy way, but it's doesn't work, and not only that, if you go to a lesson that has document.write, it will apparently disable it. I've tried reporting the glitch, but no reply has come back. var preCards = ['A','2','3','4','5','6','7','8','9','10','J','Q','K']; //makes each value for the cards var spades=[]; while (spades.length != 13) { spades = preCards[spades.length] + "♠" } var hearts=[]; while (hearts.length != 13) { hearts = preCards[hearts.length] + "♥" } var clubs=[]; while (clubs.length != 13) { clubs = preCards[clubs.length] + "♣" } var diamonds=[]; while (diamonds.length != 13) { diamonds = preCards[diamonds.length] + "♦" } //took the card values and added a suit to it var cards= spades.concat(hearts, clubs, diamonds) //combines all cards into one full deck document.write(cards);