title: While printing my function, the string is printing out a double set of commas?
body: <p>The assignment is to create our own snap-crackle game from a function.</p>
  <p>I believe I did step one of this correctly, now I'm on step two, and it's printing what I want it to print, but the string has double commas, between the elements.</p>
  <p>Could someone assists me and point me in the right direction with this?</p>
  <p>I'm not exactly sure what did I'm doing wrong in this case.</p>
  <p>For background purposes, I will share the instructions and my code so far. Thank you to anyone for the help.</p>
  <ul>
  <li><p>Step One</p>
  <p>Write a function named snapCrackle that takes one parameter: maxValue. This function should loop through 1 up to maxValue (inclusive) and build a string with the following conditions:</p>
  </li>
  <li><p>If a number is odd, concatenate &quot;Snap, &quot; to the end of the string.</p>
  </li>
  <li><p>If a number is a multiple of 5, concatenate &quot;Crackle, &quot; to the end of the string.</p>
  </li>
  <li><p>If a number is both odd and a multiple of 5 concatenate &quot;SnapCrackle, &quot; to the end of the string.</p>
  </li>
  <li><p>If a number is neither odd nor a multiple of 5, concatenate the number and &quot;, &quot; to the end of the string.</p>
  </li>
  </ul>
  <pre><code>
      // Your Code Here.
      let maxValue = 12;
      let newArray = [];
      let s = &quot;Snap,&quot;;
      let c = &quot;Crackle,&quot;;
      let x = &quot;Snapcrackle,&quot;;
      let n = &quot;,&quot;;
  
      function snapCrackle() {
        for (let i = 1; i &lt;= maxValue; i++) {
          if (i % 2 !== 0 &amp;&amp; i % 5 === 0) {
            newArray.push(x);
          } else if (i % 2 !== 0) {
            newArray.push(s);
          } else if (i % 5 === 0) {
            newArray.push(c);
          } else {
            newArray.push(i + n);
          }
        }
        return newArray;
      }
  
      console.log(snapCrackle());
  
  
  </code></pre>
  <ol start="2">
  <li><p>Step Two</p>
  <p>Write a function called render that takes in two parameters: text, and maxValue. This function should print the game to the page using document.write().</p>
  </li>
  </ol>
  <pre><code>let text = newArray;
  function render (text, maxValue){
    document.write(`
    &lt;h1&gt;Snap Crackle!&lt;/h1&gt;
    &lt;h3&gt;Max Value ${maxValue}&lt;/h3&gt;
    &lt;p&gt;${text}&lt;/p&gt;
    `);
  }
  console.log(render(text,maxValue));
  </code></pre>
  <p>Full Code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// Your Code Here.
  let maxValue = 12;
  let newArray = [];
  let s = "Snap,";
  let c = "Crackle,";
  let x = "Snapcrackle,";
  let n = ",";
  
  function snapCrackle() {
    for (let i = 1; i &lt;= maxValue; i++) {
      if (i % 2 !== 0 &amp;&amp; i % 5 === 0) {
        newArray.push(x);
      } else if (i % 2 !== 0) {
        newArray.push(s);
      } else if (i % 5 === 0) {
        newArray.push(c);
      } else {
        newArray.push(i + n);
      }
    }
    return newArray;
  }
  
  
  
  let text = snapCrackle();
  
  
  function render(text, maxValue) {
    document.write(`
    &lt;h1&gt;Snap Crackle!&lt;/h1&gt;
    &lt;h3&gt;Max Value ${maxValue}&lt;/h3&gt;
    &lt;p&gt;${text}&lt;/p&gt;
    `);
  }
  render(text, maxValue)</code></pre>
  </div>
  </div>
  </p>