JS/JQ - Some of the Basics

Lesson 2 - Reading Nests

When starting to read and write code...

example_html example_php example_jq

It can be hard to picture Divs, Functions, PHP Statements, and JQuery Statements, especially when they are nested inside () {} and [] brackets.

...Here is a way to look at it...

Using the practice of calling the smallest set of workable code...

a "snippet of code".

When starting to read and write code...

Define the result of the "snippet of code" by starting inside the }); symbols at the very end. Then reverse-read back to the start.

Think of the result as

Eggs: protected by many stacked nests:

arrow arrow
eggs
small nest
med nest
large nest