Please enable JavaScript to use CodeHS

CodeHS Glossary


Curly Bracket General

An open curly bracket is `{` and a close curly bracket is `}` Curly brackets are used to mark what code is in a certain block. To type a curly bracket, hold down the `SHIFT` key and press the key that has `[` and `{` on it. You can find that key on your keyboard directly to the right of `P` The `]` and `}` key is one more to the right. ---------- You should use curly brackets for all of these [control structures][1]: - [For Loop][2] - [While Loop][3] - [Defining a Function][4] - [If Statement][5] - [If/Else Statement][6] Read about how to use curly brackets on the [indentation page][7]. [1]: http://codehs.com/glossary/term/31 [2]: http://codehs.com/glossary/term/4 [3]: http://codehs.com/glossary/term/5 [4]: http://codehs.com/glossary/term/11 [5]: http://codehs.com/glossary/term/22 [6]: http://codehs.com/glossary/term/30 [7]: http://codehs.com/glossary/term/15