title: How can I make a symmetric histogram like this?
body: <p>I'd like to write a JavaScript program that displays a symmetric histogram like this image:</p>
  <p><img src="https://signal.cty.jhu.edu/CompSci/JSC/Images/Unit_4/Assignment_Part_A.png" alt="" /></p>
  <p>The program should ask the user to enter the number of bars to print and the character to use to draw the bars. The count of characters in the bar needs to be displayed on the right-side of each bar.</p>
  <p>The example showed is when I entered @ as the character and 13 as the number.</p>
  <p>Here's my 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>var symbol = prompt("Enter the symbol");
  var number = prompt("Enter the number");
  var currentNum = 1;
  let text = "";
  let symbolNum = symbol;
  
  while (currentNum &lt;= number) {
    text += "&lt;br&gt;" + symbolNum + " " + currentNum;
    symbolNum += symbol;
    currentNum++;
  }
  
  
  document.write(text + "&lt;br&gt;");</code></pre>
  </div>
  </div>
  </p>
  <p>And at last, I only can output the following:</p>
  <p><img src="https://media.discordapp.net/attachments/811539541651357716/864095773423042560/Screenshot_2021-07-12_at_6.47.54_PM.png" alt="" /></p>
  <p>I'd like to know what I can do in order to reverse the loop?</p>