What is actually the difference between document and document.body?
For example, I have the following code:
document.addEventListener('click',function(){
document.write('You click me!')
})
<div>Click anywhere</div>
What will be the difference if I use document.body instead of document ?
And what is actually the difference between document and document.body?
I tried to search online, but couldn't find any useful information.
Thanks for any responds!