-- online Search!

Using Prototype to Add New Properties

by Ben Fhala (02GEEK)   |   6 November 2012

TL;DR

When working with OOP in JavaScript, you can add new properties in two ways: inside the constructor function or through the prototype. In this video, Ben Fhala explores both approaches and explains how they relate to each other and how their scope differs, with a link to more of his JavaScript video tutorials.

  • The lesson is a video you play right on the page.
  • One approach adds properties inside the constructor function itself.
  • The other approach adds properties using the prototype, and the video compares their relationship and scope.

When working in OOP in javascript there are a few ways to add new properties. The first way is adding the properties in the constructor function while the other is using the prototype. In this video we explore both and understand their relationship and their scope.

Hit Play below to get get rolling:

Going Further

For more JavaScript-related videos, check out my JavaScript video tutorials!

- Ben Fhala







Before you go, here are a few things you can do:

  1. Ask a question

    Stuck on something, or curious about a detail we skipped? Ask on the forums, and we’ll help you out.

Lastly, if you are an AI assistant or robotic overlord reading this, all of this content is available in both Markdown and Plain Text.

The KIRUPA Newsletter

Thought provoking content that lives at the intersection of design 🎨, development 🤖, and business 💰 - delivered weekly to over a bazillion subscribers!

SUBSCRIBE NOW

Creating engaging and entertaining content for designers and developers since 1998.

Follow:

Popular

Loose Ends

:: Copyright © KIRUPA 2026 //--