Home > Sample chapters > Programming > HTML, JavaScript and web development

JavaScript Programming Basics

Summary

With this second chapter complete, you should now have a good grasp of the basic rudimentary syntax of JavaScript. In this chapter, you learned about comments, white space, names and reserved words, JavaScript statements and expressions, and case sensitivity. You also learned that you use variables to store data in programs and that JavaScript has several data types that include numbers, strings, Booleans, null, and undefined. These will be used throughout the book so that you get a better feel for their use in practice.

The chapter wrapped up with a look at looping, primarily through the use of for loops, and conditionals, mostly using if/else statements. The next chapter explores some of the more powerful areas of the language—namely, functions and objects. Both functions and objects are central to most modern programming languages, including JavaScript.