title: How to print star pattern in JavaScript in a very simple manner?
body: <p>I have tried the code below but it's output is not proper!</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>for(i=5;i&gt;=1;i--) {
      for(j=i;j&gt;=1;j--){
          console.log(j);
      }
          console.log("\n");
  }</code></pre>
  </div>
  </div>
  </p>