title: How to format output in JavaScript
body: <p>The script code is for Fibonacci Series. The problem is the output doesn't look good for the eyes. The output is something like this <code>0,1,1,2,3,5,8,13,21,34,5...</code>. What I want is to format this output and add space after the comma. Is it possible?</p>
  <pre><code>&lt;div class=&quot;outer&quot;&gt;
          &lt;div class=&quot;container&quot;&gt;
             &lt;button onclick=&quot;fibonacci_series(90)&quot;&gt;Click To Display Fibonacci Series up to 90&lt;/button&gt;
             &lt;p id=&quot;demo&quot;&gt; &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;script&gt;
           var fibonacci_series = function (n) {
              if (n == 1) {
                  var loop = [0, 1];
                  document.getElementById(&quot;demo&quot;).innerHTML = loop;
                  return loop
              }
              else {
                  var s = fibonacci_series(n - 1);
                  s.push(s[s.length - 1] + s[s.length - 2]);
                  document.getElementById(&quot;demo&quot;).innerHTML = s;
                  return s    
              }
          };
      &lt;/script&gt;
  </code></pre>