title: React - how to render multiple buttons with a regular for loop?
body: <p>Sorry if its very basic but:
  when rendering multiple buttons (0-9) in an iteration - What is the difference btw map and for loop ? Why does the for loop only renders the first element (0) while map works fine? Why do I have to first push the buttons into an array and return that then (as seen on other examples) ? Can I use regular for loop and render buttons without pushing it into an arary?
  Thanks!</p>
  
  <pre><code> import React from 'react';
  
      const Keys = () =&gt; {        
         const renderKeys = () =&gt; {
           //works fine
            var arr = [1,2,3,4,5,6,7,8,9]
            return arr.map((val) =&gt; {
                return &lt;button&gt;{val}&lt;/button&gt;
              })                 
          };
  
          const renderKeys = () =&gt; {       
                //does not work    
                for (var i=0; i&lt;10; i++) {
                 return &lt;button&gt;{i}&lt;/button&gt;
              }
          };
  
          return (
              &lt;div&gt;
                  {renderKeys()}
              &lt;/div&gt;
          )
      };
  </code></pre>