GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing javascript.info — Chaining back to the lesson Chainingimportance: 2 There’s a
Now, if we need to make several calls in sequence, we can do it like this:
Modify the code of
Such an approach is widely used across JavaScript libraries. The solution is to return the object itself from every call. We also can write a single call per line. For long chains it’s more readable:
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |