Testing

Parentheses ()

These are known as "grouping operators" and are used around expressions and sub-expressions to control operator precedence. Grouping operators could be thought of like a id bracelet.

If there's a long line of people (expressions) waiting to enter a concert, some people (expressions) are given priority access over others depending on the colour of your id bracelet and are processed first.


TOP

Brackets []

Brackets are indicative of arrays||lists and are used to create, access, loop, append, remove, prepend, find by index, remove by index, copy.

Continuing on with the analogy of the id bracelet, these bracelets entitle you to do a range of actions||things while in use.

TOP

Braces {}

These are predominantly used to define key value pairs in objects like:
var car = {"make" : "cadillac", "model" : "escalade"}
as well as for loops, while loops, if (conditional) statements like:
if (var i > 10) { do this }.

So, anything contained within braces {} or wearing this type of bracelet either hold info (object variable/s) or do something (method).

TOP

Single Quotes ' ' | Double Quotes " "

Quotation marks can usually be seen around strings. There is no explicit difference between which one should be used over the other (except where JSON requires the double quotes), however it is important to note that when opening with one you must close with the same.

I personally use "" as it reinforces keymapping for my fingers.


TOP