Previous: Understanding JavaScript Objects

Summary

In this chapter, you learned quite a bit about the basics of JavaScript, beginning with how to add scripting elements to your pages, how to hide them from incompatible browsers, and how to create comments within the script. You then saw a brief "Hello World" example, which showed you a working JavaScript.

From there, you were introduced to functions, how they're declared, and how they're called from the body of the script. Then you learned about variables, how they're created, how values are assigned to them, and some special ways in which they can be incremented and decremented. In that same section, you were introduced to arrays.

After variables came comparisons, including a look at many of the comparison operators and how they differ from mathematical operators. In that section, you also learned about the comparisons that can be done and how they're used together with the conditionals and loops to control the flow of a JavaScript.

Finally, you learned about objects within JavaScript, including how to define objects and how to create and use methods. The chapter ended with an overview of three important built-in objects: the String object, the Math object, and the Date object. You can use all this knowledge in the online chapters "JavaScript and User Input" and "Adding Dynamic HTML Elements" as you create more advanced scripts and solutions with JavaScript.

Previous: Understanding JavaScript Objects