O'Reilly logo

JavaScript Absolute Beginner’s Guide by Kirupa Chinnathambi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13. When Primitives Behave Like Objects

In This Chapter

Get a deeper understanding of how primitives and objects work

Understand that even primitives have object-like traits

Wonder how JavaScript ever got to being so popular

In the previous chapter (Chapter 12, “Strings) and less so in the Of Pizza, Types, Primitives, and Objects chapter (Chapter 11), you got a sneak peek at something that is probably pretty confusing. I’ve stated many times that primitives are very plain and simple. Unlike Objects, they don’t contain properties that allow you to fiddle with their values in interesting (or boring) ways. Yet, as clearly demonstrated by all the stuff you can do with strings, your primitives seem to have a mysterious dark side to them: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required