December 2019
Beginner
464 pages
10h 31m
English
In This Chapter
• Extend your objects’ functionality
• Learn more about the prototype chain
As we know very well by now, JavaScript comes from the factory with a good supply of built-in objects. These objects provide some of the core functionality for working with text, numbers, collections of data, dates, and a whole lot more. As you become more familiar with JavaScript and start doing interesting-er and cleverer things, you’ll often find that you want to do more and go farther than what the built-in objects allow.
Let’s take a look at an example of when something like this might occur. Below is an example of how we can shuffle the contents of an array:
function shuffle(input) ...