Design Patterns · Junior · Question 16 of 75

How is the Prototype pattern related to JavaScript?

Explanation

The Prototype pattern is about creating objects by cloning a sample. In JS, objects inherit from other objects via the prototype chain, and Object.create(proto) creates an object with a given prototype. A UI prototype (a mockup) is an entirely different concept.

Further reading

Problem with a question

Design Patterns · Junior · question 16

Test yourself

Take the Design Patterns · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz