title: Assign a string but get back an object -the browser at play?
body: <p>Given this tag:</p>
  
  <pre><code>&lt;p id="myp"&gt;foo para
  </code></pre>
  
  <p>I know you're not supposed to, but if I assign a string to the <code>style</code> property of the corresponding DOM object, I can change its style: </p>
  
  <pre><code>let p = document.getElementById('myp');
  p.style = 'color: red'; //assign a string
  </code></pre>
  
  <p><code>p.style</code> should now point to a string, I suppose. But if I then ask for the style property, I get an object rather than a string: </p>
  
  <pre><code>console.log(p.style); //get back an object
  </code></pre>
  
  <p>Normally in JavaScript if I assign a string to a variable or object property, I expect the value to still be a string when I ask for that value. So is the browser jumping in to change this, or is there a JavaScript mechanism at play?</p>