Intro to Custom JS Objects

Published on: March 11, 2017

Hey there! Welcome to the 38th Easy JavaScript tutorial, part of Let's get deeper into object-oriented programming and learn about creating custom JavaScript objects!

Objects follow the JSON format. They are encased in curly braces and can contain strings, numbers, boolean, arrays, other objects, null, and custom functions known as methods. The data within the object is separated by commas (like array items).

Syntax of an object:

var person = {
        "id" : "1",
        "name" : "Nazmus",
        "title" : "Developer",
        "social" : {
            "website" : "",
            "facebook" : ""
        method1 = function(){
            //write what method1 does

Reading Object Data


To fork the fiddle and follow along:


Remember to checkout the Resources section below for associated downloadable content, JSFiddle links, and other resources. Watch the video and follow along!