As you see in the end of the first line:
The last argument defines the namespace in which our SDK is accessible through. We set it to
$p by default but you may change it to
$li or any other form you're comfortable with in case
$p is already taken for you.
$p functions can be invoked by passing in the string that specifies a function. This is followed by an argument that's specific to the function, and then an options object where you have the option of defining a callback or certain configurations.
On a standard web flow there is a predictable site navigation procedure (request a new page, loads the page, and etc). However, Single Page Applications are usually like standard Apps in that you load it once and have its state changed in response to user's actions.