title: javascript - understanding how css classes change / update
body: <p>I have a div with id="mydiv" it is not assigned to a class at the beginning.
  The following two functions assign classes to the mydiv.</p>
  
  <pre><code>function one(){
  document.getElementById(mydiv).setAttribute("class", "classone");
  }
  
  function two(){
  document.getElementById(mydiv).setAttribute("class", "classtwo");
  }
  </code></pre>
  
  <p>After these two functions are completed what is the className of mydiv?
  Is it classtwo or classone and classtwo both?
  (If it is both classes - how can I change function two to ;</p>
  
  <ol>
  <li>first delete the current className of the mydiv</li>
  <li>then assign the className (the code I have already mentioned in the function)
  ) </li>
  </ol>