title: How to pass in an argument to function call to change css styling?
body: <p>I want to create a function that allows me to show or hide a button by passing in an argument to the function.</p>
  
  <pre><code>&lt;div class="grid"&gt;
  &lt;div id="quiz" class="centered grid__col--8"&gt;
      &lt;h1&gt;Awesome Quiz&lt;/h1&gt;
  
      &lt;h2 id="question" class="headline-secondary--grouped"&gt;&lt;/h2&gt;
      &lt;h3 id="score"&gt;&lt;/h3&gt;
  
      &lt;p id="choice0"&gt;&lt;/p&gt;
      &lt;button id="guess0" class="btn--default"&gt;Select Answer&lt;/button&gt;
  
      &lt;p id="choice1"&gt;&lt;/p&gt;
      &lt;button id="guess1" class="btn--default"&gt;Select Answer&lt;/button&gt;
  
      &lt;footer&gt;
          &lt;p id="progress"&gt;Question x of y&lt;/p&gt;
      &lt;/footer&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>Above I have the button element with id="guess0". I want to use a javascript function to hide that element after a certain action happens using an if...else statement.</p>
  
  <p>I have tried the options below without success: (I realize that the last one is probably dumb, but I wanted to be thorough in what I have already tried.)</p>
  
  <pre><code>function guess0ButtonDisplay(displayStyle) {
  guess0Button.style.display = '\'' + displayStyle + '\'' ;
  }
  
  function guess0ButtonDisplay(displayStyle) {
  guess0Button.style.display = displayStyle;
  }
  
  function guess0ButtonDisplay(displayStyle) {
  guess0Button.style.display = 'displayStyle';
  }
  </code></pre>
  
  <p>Attempting to call the function:</p>
  
  <pre><code>guess0ButtonDisplay(none);
  </code></pre>
  
  <p>The console reported an "Uncaught ReferenceError: none is not defined" for all of the above functions when I called them and passed in the argument 'none'.</p>
  
  <p>If I want to simply hide the button with "id=guess0" I can use the following function successfully:</p>
  
  <pre><code>function guess0ButtonDisplay() {
  guess0Button.style.display = 'none';
  }
  </code></pre>
  
  <p>However, I want to know if I can use one function to change the css display property value in multiple places throughout the code rather than writing separate functions to hide the element (set css: display=none;) and another function to show the element (set css: display=inline;).</p>