Creating Patterns

Write a program that prints out the following pattern to the console (7 rows):

Your program should contain no more than one console.log() statement (looped over
multiple times) and you should be able to adjust the number of rows printed by changing
one number within your code. Save your code in a file with the .js file extension and
execute it using Node.js.

Output:

#######

I tried using console.log() but I don’t get symbols on same line for i > 1.

Can you post the code?