title: add and remove id by pure JavaScript
body: <p>How can I remove and add any id by pure JavaScript? Like</p>
  
  <pre><code>document.querySelector('div').classList.add('newClass') ;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>document.querySelector('div').classList.remove('oldClass') ;
  </code></pre>