javascript classlist to array code example Example: javascript classlist to array li.classList.contains('main-nav')