title: Can someone explain how this function is working?
body: <p>So what I'm doing is creating a site that displays information about a person when you click a button. The information is displayed in a text box on a part of the page, and you can click the "Info" button next to the person's name to make the content appear in the text box. The issue I was having was that I couldn't get the content to disappear when I clicked the second "Info" button to get the other person's information to show up. I understand that a function had to be created to change the "display" property to "block" from "none." I understand the first two statements of the function, but once it gets to the "if...return" statement, I don't understand what's going on. 
  Any help in explaining this would be great! </p>
  
  <p>Thanks! </p>
  
  <pre><code>function resetBioVisi()
  {
      var bioElem = document.getElementById("bio");
      var bios = bioElem.childNodes;
      if (bios.length == 0) return;
      for (var index = 0; index &lt; bios.length; index++)
          if (bios[index].style !== undefined)
                  bios[index].style.display="none";
  }
  </code></pre>