JavaScript AddClassList di JavaScript Dom

// select element and append class
const div = document.querySelector('div');
div.classList.add('class-1', 'class-2', 'class-3', 'class-n');

// create element and append class
const div = document.createElement('div');
div.classList.add('class-1', 'class-2', 'class-3', 'class-n');
Horny Dev