Author: saqibkhan

  • ES5 Object Methods

    The ES5 Object methods in JavaScript are used to manipulate and protect the obejcts. ECMAScript 5 (ES5) is a significant revision of the language introduced in 2009. It has added many object methods to JavaScript. These methods provide us with efficient ways to iterate through object properties, manipulate values, and perform various operations on objects. Object manipulation…

  •  Native Prototypes

    Native Prototypes The native prototypes in JavaScript are property of Object.prototype object. The prototypes are the mechanism by which the objects inherit features from one another. In JavaScript, each object contains the prototype property. The prototype of each object contains the methods and properties related to the object. So, it is also called the native prototype. However, you can update or add new methods and properties…

  • Object Constructors

    Object Constructors An object constructor in JavaScript is a function that creates an instance of a class, which is typically called an object. A constructor is called when you declare an object using the new keyword. The purpose of a constructor is to create an object and set values if there are any object properties present. There are…

  •  Object Accessors

    The object accessor properties in JavaScript are methods that get or set the value of an object. They are defined using the get and set keywords. Accessor properties are a powerful way to control how your objects are accessed and modified. The JavaScript object can have two kinds of properties. The below property is called the data…

  • Display Objects

    Displaying Objects in JavaScript There are different ways to display objects in JavaScript. Using the console.log() method, we can display the object in the web console. Sometimes developers require to display the object properties and their value in the HTML or for debugging the code. For displaying an object, we can access the different properties…

  •  Static Methods

    What are Static Methods? A static method in JavaScript is defined using the static keyword followed by the method name. You can execute the static method by taking the class name as a reference rather than an instance of the class. The main benefit of the static method is that it can be used to create a utility function that doesn’t require the…

  • Object Methods

    JavaScript Object Methods JavaScript object methods are object properties that contains function definitions. An object is a collection of properties, and a property is an association between a name (or key) and a value. A property’s value can be a function; in that case the property is known as a method. You can either directly…

  • Object Properties

    JavaScript Object Properties An object property in JavaScript is a key: value pair, where key is a string and value can be anything. The key in key: value pair is also called property name. So the properties are association between key (or name) and value. An object is in other terms a collection of properties (key: value pairs). However,…

  • Classes

    JavaScript Classes The JavaScript classes are a blueprint or template for object creation. They encapsulate the data and functions to manipulate that data. We can create the object using classes. Creating an object from a class is referred to as instantiating the class. In JavaScript, the classes are built on prototypes. The classes are introduced to JavaScript…

  •  Objects Overview

    JavaScript Objects The JavaScript object is a non-primitive data type that is used to store data as key-value pairs. The key-value pairs are often referred as properties. A key in a key-value pair, also called a “property name”, is a string and value can be anything. If a property’s value is a function, the property is known as a method.…