x.classlist.toggle( change ) code example Example: classlist toggle const elementClasses = elementNodeReference.classList;