How to add multiple classes to element in JavaScript

DOM
By Jad Joubran · 
Last updated Sep 22, 2018
<div id="box"></div>
const element = document.querySelector("#box");

element.classList.add("active", "highlighted");
<div id="box" class="active highlighted"></div>