text: Q:
  
  console.log prints only one line in javascript?
  
  I want to print something like:
  #
  ##
  ###
  ####
  #####
  ######
  #######
  
  My code is: 
  <html>
  <head>
      <title>Learning Javascript</title>
  </head>
  <body>
  
  <script type="text/javascript">
      for (var i = 1; i <= 7; i++) {
          for ( var j = 1 ; j <= i ; j++ )
          {
              console.log("#");
          }
      }
  </script>
  </body>
  </html>
  
  It gives only a single #:
  #
  
  Why am I not getting expected output in console log? 
  I have tried both chrome and firebug.
  
  A:
  
  Actually, I believe you're getting 28 of them, but the console "merges" them into one.
  
  In any event, your code is printing # on a separate line each time. You want to concatenate j #s and print that in the outer for loop.
  Alternatively, you can do this:
  for (var i = 1; i <= 7; i++) {
      console.log("#".repeat(i));
  }
  
  A:
  
  In console same value will be counted instead of printing separately
  If you wanna to to print separately then concat as string then print
  Try like this 
  for (var i = 1; i <= 7; i++) {
      var str="";
      for (var j = 1; j <= i; j++) {
         str+="#"
      }
      console.log(str);
  }
  
  JSFIDDLE
  
  