title: Using 'vanilla' JS to set CSS property on selected elements
body: <p><strong>JavaScript Newbie</strong> so the following question maybe 'dumb'.</p>
  
  <p>For my work I do a little GreaseMonkey scripting to make our eCommerce store back end a little more friendly to our customer service team. Normally I'd make a new or better UI for them setup a special role or something, but with this current system, this is literally not an option.</p>
  
  <p>Specifically I make a selection of links <code>visibility: hidden</code>, as they trigger some reporting functions which can lock up the backend till the reports are completed.</p>
  
  <p>Up to this point I have had the script load jQuery, which is fine but not ideal. Then I dug in and saw that the interface was built using YUI, while this is already loaded, the syntax is weird to me, and I don't like it much, plus it is now not supported.</p>
  
  <p>Recently I found the <a href="https://plainjs.com/" rel="nofollow">Plain JS</a> site, which describes how to use 'vanilla' JS to do jQuery like things. <em>Splendid!</em> I thought, <em>Now I can just write simple JS without extra dependencies or libs!</em> But this is not quite the case.</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>var links = Array.from(document.querySelectorAll("a")); // creates an actual array from the node list returned by document.query
  var links_to_hide = links.slice(14, 22); // gets just the bits we want to affect from the array, and is still an array
  
  // ok so 'links_to_hide' is an array, and it is an array of 'a' anchor tags.
  // if I go into the inspector and set the visibility property it affects the tag but doing it via scripting seems to not work.
  // so if links_to_hide is an array it should be possible to 
  
  for(var i = links_to_hide.length; i &lt;= links_to_hide.length; i++){
    links_to_hide.style['visibility'] = 'hidden';
  }
  // this for loop doesn't seem to actually affect anything
  </code></pre>
  
  <p>What am I missing. Near as I can tell this should work.</p>