What is  in angular const body = document.getElementsByTagName(‘body’).
In js every “getElementsBy…” construct generates an Array with entire nodes of the DOM that have the property, attribute, value, class, id, ….you’re asking for. You know in an HTML Page there is Just a single body element but with this call of document object you consider everything as a node element used from DOM tag. If you want a pretty view of code you can use ElementRef combined with a nativeElement propery instead.
Contents are equals but in first case you retrieve data from Array and in second you get an instance of real document node so your content data will be less heavy. Both bets to a DOM element.
const body = document.getElementsByTagName(‘body’);