0% found this document useful (0 votes)
10 views17 pages

IT204 (Java Script) Lec5

Uploaded by

heshamdahy5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views17 pages

IT204 (Java Script) Lec5

Uploaded by

heshamdahy5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Objects

• As we know from the chapter Data types, there are seven data types in
JavaScript. Six of them are called “primitive”, because their values
contain only a single thing (be it a string or a number or whatever). In
contrast, objects are used to store keyed collections of various data and
more complex entities. In JavaScript, objects penetrate almost every
aspect of the language. So we must understand them first before going
in-depth anywhere else.
2
Objects
• An object can be created with figure brackets {…} with an optional list of
properties. A property is a “key: value” pair, where key is a string (also called a
“property name”), and value can be anything.
• We can imagine an object as a cabinet with signed files. Every piece of data is
stored in its file by the key. It’s easy to find a file by its name or add/remove a
file.

3
Objects

4
Objects

5
Objects

6
Objects

7
Objects

8
Objects

9
Objects

10
Objects

11
Objects

12
Objects

13
Objects

14
Objects

15
Objects

16
Thank You

17

You might also like