3.11. Summary

This chapter provided a brief introduction to JavaScript. You saw how script is included in a page and explored techniques for minimizing the overhead associated with loading script. JavaScript is a dynamic language that allows types to be modified on the fly using the prototype. You can also create closures with functions that capture a given scope for even greater flexibility.

Not only does JavaScript have support for the fundamental types of string, number, and Boolean, but it also treats functions as first-class types as well as objects. The late binding nature of JavaScript means that you can improve performance by caching aggressively. In addition, you have seen that JavaScript can be confusing with support for null as well as undefined types. The equality operators and strict equality operators can complicate things further, so being explicit about what you are after will eliminate frustration in the end.

Get Professional ASP.NET 3.5 AJAX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.