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