• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Using Operators > Assignment and Compound Assignment

Assignment and Compound Assignment

The assignment operator (=) stores the result of an expression in a variable, array element, or object property, as in these examples:

x = 2; // stores the number 2 in the variable x 
month[11] = “December”;// 12th element of the month array is “December” 
car.color = 0xFF0000; // color property of car object is 0xFF0000 (red) 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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