title: Get next / previous element using JavaScript?
body: <p>How do I get the next element in HTML using JavaScript?</p>
  
  <p>Suppose I have three <code>&lt;div&gt;</code>s and I get a reference to one in JavaScript code, I want to get which is the next <code>&lt;div&gt;</code> and which is the previous.</p>