1. Advanced Techniques 1.1 functions
L can defer any branch to the first calling function using the lazy load function
The L function binding allows you to create functions that are always run in the specified environment, while the function curry allows you to create functions that have already filled in certain parameters.
L Combine binding and curry to execute functions with arbitrary parameters in any environment
1.2 Objects
ECMASCRIPT5 allows you to create tamper-resistant objects in several ways:
L Non-extensible objects, not allowed to add new properties or methods to objects
L sealed objects, also non-extensible objects, do not allow the deletion of existing properties and methods
L Freeze objects, also sealed objects, do not allow members of re-objects
1.3 Timers
The L Timer code is placed in a waiting area until the event interval is reached, adding code to the processing queue of the JavaScript, waiting for the next JavaScript process to run idle
Every time a piece of code executes, there will be a small amount of free time for other browsers to process
This behavior means that you can use a timer to slice a long-running script into a small piece of code that can be run at a later time, helping the Web app to have a more positive impact on user interaction
Javacript advanced Programming-advanced techniques