• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

DATA TYPES

If you’ve made it through the preceding lessons, you’ve already been introduced to all of the data types. However, since you’ve never looked at all of them together, here’s a quick review:

  • String. This data type represents a text value (such as a name or title) or a value placed within quotation marks (such as "hello" or "dog" ).

  • Number. Numbers represent any numerical value that does not appear within quotes. For example, 6 represents the numeric value as shown, while “6” (with quotes) represents a string value. Understanding the difference between the two is crucial when it comes to manipulating data, especially when using the addition operator (+, which you’ll learn about in the section, “Operators”). For example, “6” + “2” equals a string value of “62,” but 6 + 2 (no quotes) equals a value of 8.

  • Boolean. A Boolean value can have one of two states: usually true or false or 1 or 0.

  • Object. Objects serve as storage devices for any data type, including other objects. They also can contain properties and methods that allow you to control and use them for various tasks. To review the types of objects available and how to use them, see Lesson 4, Understanding and Using Objects.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint