Although the @Brendan’s answer is accepted and correct.
It is simple, short and faster enough to get a body element using
document.body;
It does the same as we can do with document.getElementsByTagName('body')[0];
, and it should be in the list of answers.