javascript get class of body code example Example: javascript get class of body document.body.classList.contains('my-class-name')