Tag: Javascript
-
Video – How to create constant or a read-only property in JavaScript
This video explains to create a constant or a read-only property in JavaScript.
-
Video- Why You need the apply() and the call() methods in JavaScript
To pass value of ‘this’ object in a function apply and the call methods are used. The apply() and the call() methods are used to call a function indirectly. When you call a function using the apply() and the call() methods, that is called Indirect Invocation Pattern . The first parameter is always the…
-
Video – Various ways of creating a function in JavaScript
This video teaches you the various ways of creating a function in JavaScript. There are four ways a function can be created in JavaScript. They are as follows: 1. A function as a Statement 2. A function as an Expression 3. A function as an Arrow function 4. A function using Function constructor …
-
Five Things about JavaScript delete operator
A better understanding of delete operator is necessary for JavaScript developers. As the name suggests, the delete operator deletes properties from the object. You can delete a property as shown below: It returns true on successful deletion. However, in some cases, it may return true even if it does not delete a property. In this…
-
All about NaN in JavaScript
In JavaScript, NaN is one of the most confusing concepts; hence, it is often asked in the interview. You may have come across questions such as, What is NaN What is the type of NaN How to check for the NaN What is the difference between isNaN() and Number.isNaN() In this post, let us learn…
-
Delivering two talks at Devfest Gandhinagar 2019
Ahmadabad is always very close to me as I did my first public speaking in this city back on 24 July 2010. Since then I have been trying to do at least one workshop or talk each year here, so continuing the ritual, I am again coming to Ahmadabad/Gandhinagar on 13th October to speak in…
-
Simplifying Maps in the JavaScript
Maps is a data structure, which stores the key/value pair in an ordered way. Since the inception of the JavaScript, objects are primarily used for the map. Consider the below code listing: To store two key/value pairs, we have created an object foo and using the keys such as id and color to retrieve…
-
Why you need Proxy objects in JavaScript
JavaScript is not truly Object Oriented language, hence implementing requirements as stated below could be challenging. For example, Throw an error if the setting value of a property does not satisfy a particular condition If the property does not exist on set some default value instead of undefined If the property does not exist on…
-
Step by Step implementing Two-Way Data Binding in Vanilla JavaScript
Data Binding is one of the most important features of all the frameworks. It ensures that the data model and the views are in sync with each other. It is very fundamental feature of any MV* frameworks such that Model-View-Controller, Mode-View-ViewModel, and Model-View-Presenter, etc. Popular JavaScript based frameworks such that React, Angular have their way…
-
Video : Four ways of creating an object in JavaScript
There are four ways an object can be created in JavaScript object as a literal Using the new operator, also knows as constructor invocation pattern Using the Object.create() method Using the class starting ES6 Watch full video here : Source Code : This file contains bidirectional Unicode text that may be interpreted or compiled differently…