Home

Differences between braces, parentheses and square brackets

Braces

A brace is either of the two marks { and }. In programming the braces are usually used to surround a block of statements.

{ }

Square brackets

In programming, square brackets are used to pick an element from a list

[ ]

Parentheses

In programming, parentheses are used to invoke a function or during the declaration of function to group the arguments

( )


Last Updated on

Next Post: GraphProtocol: TS2322 null assignment in Subgraph →

Comments