title: correctly adding defer attribute to script tag with pure javascript
body: <p>so I try to add a deferred script tag like this</p>
  <pre><code>const script = document.createElement('script');
    script.setAttribute('src', '/script.js');
    script.setAttribute('type', 'text/javascript');
    script.setAttribute('defer', true);//this is the code in question!
    document.getElementsByTagName('body')[0].appendChild(script);
  </code></pre>
  <p>But I found out the result script tag will generate the <code>defer</code> attribute like <code>defer=true</code> instead of just <code>defer</code>.</p>
  <p>Are they same? What is the implication if I do <code>defer=true</code> rather than <code>defer</code>?</p>
  <p>Thanks!</p>