My Blog

My WordPress Blog

My Blog

My WordPress Blog

6. Object Oriented

Proxies

Proxy in JavaScript The JavaScript proxies are objects that allow you to wrap a particular object and customize the fundamental operations of the object, like getting and setting object properties. In short, using the proxy object, you can add custom behavior to the object. The proxies are used to implement features such as logging, caching, and securities. […]

Global Object

Global Objects in JavaScript The JavaScript global object allows you to access the variables, functions, objects, etc., defined in the global scope and available everywhere in the code. In the browser, a global object is named as ‘window‘, and in Node.js, the global object is named ‘global‘. However, the global object could have different names in different […]

Nested Destructuring

Nested Destructuring The Nested Destructuring in JavaScript allows us to extract data from nested objects and arrays. An object (or array) can contain another object (or array) inside itself, known as a nested object (or array). Unpacking the nested objects or arrays is called nested destructuring. We can extract all or some data from the objects or arrays using […]

Destructuring Assignment

Destructuring Assignment In JavaScript, the destructuring assignment is an expression that allows us to unpack the values from the arrays or objects and store them in individual variables. It is a technique to assign array values or object properties to the variables. The destructuring assignment syntax is introduced in ECMAScript 6 (ES6). Before ES6, developers were unpacking […]

Polymorphism

Polymorphism in JavaScript The polymorphism in JavaScript allows you to define multiple methods with the same name and different functionalities. Polymorphism is achieved by using method overloading and overriding. JavaScript does not support method overloading natively. Method overriding allows a subclass or child class to redefine a method of superclass or parent class. In this chapter, we will implement the […]

Abstraction

Abstraction in JavaScript The Abstraction in JavaScript can be achieved using the abstract class. In object-oriented programming, the abstraction concept allows you to hide the implementation details and expose features only to the users. For example, you can execute the Math object methods in JavaScript by accessing the method using its name but cant see […]

Scroll to top