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