title: unable to rotate a div in javascript
body: <p>i cant rotate a div in js with an eventlistener and dont know how to fix it. however i do know the problem (i think, im probably incorrect): its NaN. when the parseFloat() checks the rotate, it cant find the number because it thinks its a string, so it returns NaN.</p>
  
  <p>theres also another problem. when the div is going in a direction, the border is vanishing away. dont know how to fix it either.</p>
  
  <p>EDIT: I want the div to move but also rotate at the same time, forgot to add that.</p>
  
  <p><a href="https://jsfiddle.net/CarelessInternet/4cxgnerv/" rel="nofollow noreferrer">https://jsfiddle.net/CarelessInternet/4cxgnerv/</a></p>
  
  <p>(basically showing the problem below a bit, just check the jsfiddle please, thanks)</p>
  
  <pre><code>var transformLeft = false,
  transformRight = false,
  
  var computedStyle = window.getComputedStyle(document.getElementById("square")),
  transformLeft = parseFloat(computedStyle.transform),
  transformRight = parseFloat(computedStyle.transform);
  
  if (transformLeft == true) {
      transformLeft = transformLeft + 5;
      square.style.transform = 'rotate(' + transformLeft + 'deg)';
  } else if (transformRight == true) {
      transformRight = transformRight + 5;
      square.style.transform = 'rotate(' + transformRight + 'deg)';
  }
  </code></pre>