title: How can I disable a button on my page if I know only the name of that element?
body: <p>I have the following HTML:</p>
  
  <pre><code>&lt;button name="darkBlue" onclick="setThemeColor(this.name)"&gt;Blue&lt;/button&gt;
  &lt;button name="black" onclick="setThemeColor(this.name)"&gt;Black&lt;/button&gt;
  </code></pre>
  
  <p>and this script:</p>
  
  <pre><code>if (localStorage.buttonColor) {
     var themeButtons = document.querySelectorAll(".theme");
     for (var button in themeButtons) {
        themeButtons[buttons].removeAttribute("disabled");
     }
     // I need here to disable the button with the name that matches localstorage name
  }
  </code></pre>
  
  <p>I already have in place a way to remove the disabled from all the buttons. But how can I after that disable the button which has the same name as the localStorage.buttonColor without using jQuery?</p>
  
  <p>Also could I do all this in the <code>for (var button in themeButtons)</code> loop? If I could do that it might be even more clean of a solution.</p>