Skip to Main Content
JavaScript Absolute Beginner's Guide, 2nd Edition
book

JavaScript Absolute Beginner's Guide, 2nd Edition

by Kirupa Chinnathambi
December 2019
Beginner content levelBeginner
464 pages
10h 31m
English
Que
Content preview from JavaScript Absolute Beginner's Guide, 2nd Edition

15. 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 be so popular

In the earlier Strings chapter and less so in the Of Pizza, Types, Primitives, and Objects chapter, we 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 we can do with strings, our primitives seem to have a mysterious dark side to them:

let ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaScript Absolute Beginner’s Guide

JavaScript Absolute Beginner’s Guide

Kirupa Chinnathambi

Publisher Resources

ISBN: 9780136204213