-3

How can I allow it to be true first then after 10 secs, it will become false?

MemoryGame.Card = function(value) {
this.value = value;
this.isRevealed = false;

this.reveal = function() {
this.isRevealed = true;
}

this.conceal = function() {
this.isRevealed = false;
}
};
Kayden
  • 133
  • 3
  • 16

1 Answers1

0

You can look at Window setTimeout() Method. So your code may be something like:

window.setTimeout(function() { conceal(); }, 10000);
George
  • 6,630
  • 2
  • 29
  • 36
Niek Janssen
  • 56
  • 1
  • 8
  • 1
    Please post the answer as an 'answer' to the question, if you want to give suggestions, use the comments – Harman Oct 30 '17 at 12:26
  • 1
    you shouldn't make an anonymous function just to call another function. You should do this window.setTimeout(conceal(), 10000); – Cody Fortenberry Oct 30 '17 at 12:29