Appendix A. Review
The following points summarize what you should have learned during the reading of this book (and investigation of code examples). Read each summary, and if you donât understand what is being said, return to the topic in the book.
An object is made up of named properties that store values.
Most everything in JavaScript can act like an object. Complex values are, well, objects and primitive values can be treated like objects. This is why you may hear people say that everything in JavaScript is an object.
Objects are created by invoking a constructor function with the
new
keyword, or by using a shorthand literal expression.Constructor functions are objects (
Function()
objects), thus, in JavaScript, objects create objects.JavaScript offers 9 native constructor functions:
Object()
,Array()
,String()
,Number()
,Boolean()
,Function()
,Date()
,RegExp()
, andError()
. TheString()
,Number()
, andBoolean()
constructors are dual-purposed in providing a) primitive values and b) object wrappers when needed, so that primitive values can act like objects when so treated.The values
null
,undefined
,"string"
,10
,true
, andfalse
are all primitive values, without an object nature unless treated like an object.When the
Object()
,Array()
,String()
,Number()
,Boolean()
,Function()
,Date()
,RegExp()
, andError()
constructor functions are invoked using thenew
keyword, an object is created that is known as a âcomplex objectâ or âreference object.â"string"
,10
,true
, andfalse ...
Get JavaScript Enlightenment now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.