background

Chapter 4

Chapter 4 deals with Variables in JavaScript. In this chapter we learned that variables in JavaScript do not need to be declared with a specific datatype. In order to create variables, you need to either use the var keyword before the variable's name or assign a value to the variable. When a value is assigned to a variable in JavaScript, its datatype is determined by the type of value that was assigned to it. For example, route = 43; is assigning a variable, route an integer value of 43. Route is an integer variable.