11. JavaScript: Objects
My object all sublime I shall achieve in time.
—W. S. Gilbert
Is it a world to hide virtues in?
—William Shakespeare
Objectives
In this chapter you’ll:
• Learn object-based programming terminology and concepts.
• Learn the concepts of encapsulation and data hiding.
• Learn the value of object orientation.
• Use the methods of the JavaScript objects Math
, String
, Date
, Boolean
and Number
.
• Use HTML5 web storage to create a web application that stores user data locally.
• Represent objects simply using JSON.
Outline
11.3.1 Fundamentals of Characters and Strings
11.3.2 Methods of the String
Object
Get Internet & World Wide Web: How to Program, Fifth Edition 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.