retour au cours
Ce contenu n'est disponible que dans les langues suivantes :English, Español, Indonesia, Italiano, 한국어, Русский, Українська, 简体中文. Merci de

Please note:

  1. We clear setInterval timer when the element is removed from the document. That’s important, otherwise it continues ticking even if not needed any more. And the browser can’t clear the memory from this element and referenced by it.
  2. We can access current date as property. All class methods and properties are naturally element methods and properties.

Ouvrez la solution dans une sandbox.