JavaScript ClassList to Array

li.classList.contains('main-nav')
Lioruby