Javascript Classlist to Array

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