Punctuation symbols | ||
---|---|---|
( ) | brackets | used in arithmetic or logical expressions, and to delimit parameters |
[ ] | square brackets | used to delimit a literal |
{ } | curly braces | used to delimit a literal |
. | dot | used to define fractional number, and to access a method or property using ‘dot syntax’ |
.. | double-dot | used to define an index-range |
, | comma | used to separate items in several different forms of list |
: | colon | used to define a key-value pair in a literal |
+ | plus | the addition operator |
- | minus | the subtraction operator, or negation (unary) operator |
* | multiply | the multiplication operator |
/ | divide | the division operator, also used to delimit a literal Regular Expression (RegExp) |
^ | caret | raise-to-the-power-of operator |
< | less than | comparison operator |
> | greater than | comparison operator |
<= | less than or equal to | comparison operator |
>= | greater than or equal to | comparison operator |
=> | fat arrow | used in a |
_ | underscore | only punctuation symbol that may be used within an identifier (name), also used to ‘discard’ elements when deconstructing a |
" | double-quotes | the delimiter for a literal |
# | hash | signifies a comment |