# printing step

## problem

정수 n이 주어졌을 때, n의 길이만큼 "#"과 " "을 출력하기

## solution

```javascript
function printStep(n) {
    for(let i = 1; i <= n; i++) {
        let str = ''
        for(let j = 1; j <= n; j++) {
            if(j <= i) {
                str += '#'
            } else {
                str += ' '
            }
        }
        console.log(str)
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jiwons-organization.gitbook.io/jiwon0995/dev-note/index-11/printing-step.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
