Skip to content

Commit 8f1e612

Browse files
authored
Terjemah solution.md ke Bahasa
1 parent 7f67feb commit 8f1e612

File tree

1 file changed

+3
-3
lines changed
  • 8-web-components/2-custom-elements/1-live-timer

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
Please note:
3-
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.
4-
2. We can access current date as `elem.date` property. All class methods and properties are naturally element methods and properties.
2+
Tolong dicatat:
3+
1. Kita menghapus timer `setInterval` ketika elemen dihapus dari dokumen. Ini penting, jika tidak, timer terus berdetak bahkan jika tidak diperlukan lagi. Dan browser tidak dapat menghapus memori dari elemen ini dan direferensikan olehnya.
4+
2. Kita dapat mengakses tanggal sekarang sebagai properti `elem.date`. Semua *methods* dan properti kelas secara alami adalah *methods* dan properti elemen.

0 commit comments

Comments
 (0)