title: Getting a single element with `getElementsByTagName`
body: <p>I know that if we want to find a group of elements, getElementsByTagName is the method for us and it returns a NodeList. but if we are looking for tag name with "body" , then why we need to add [0] after the ("body") element? There is only one body tag in an HTML document.</p>
  
  <pre><code> var body = document.getElementsByTagName("body")[0];
   body.className = "unreadable";
  </code></pre>
  
  <p>why we cant write  this code without index[0] like this</p>
  
  <pre><code> var body = document.getElementsByTagName("body");
   body.className = "unreadable";
  </code></pre>
  
  <p>If i write this code the class unreadable will not be added with body tag ...why?</p>