let cards = ['Diamond', 'Spade', 'Heart', 'Club'];
let currentCard = 'Heart';
while (currentCard !== 'Spade') {
  console.log(currentCard);
  let currentCard = cards[Math.floor(Math.random() *4)];
}
console.log(currentCard);
Here my concern is about the error that currentCard is not defined , even though I have declared it globally.
So I am thinking that the error message currentCard is not defined should not come.
 
     
     
     
    