Advertisement
soden

Untitled

Feb 24th, 2024
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.24 KB | Source Code | 0 0
  1. // Mengubah teks dari elemen judul
  2. judul.textContent = 'Tutorial Memahami DOM';
  3.  
  4. // Menambah kelas "tebal" ke elemen paragraf pertama
  5. paragraf[0].classList.add('tebal');
  6.  
  7. // Menghapus elemen paragraf kedua dari DOM
  8. paragraf[1].remove();
Tags: JavaScript
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement