A JavaScript closure is a function which remembers the environment in which it was created. We can think of it as an object with one method and private variables. JavaScript closures are a special kind of object which contains the function and the local scope of the function with all the variables (environment) when the … Continue reading Closures in JavaScript: Video
Javascript
Video : __proto__ in JavaScript
This video explains __proto__ in JavaScript in less than 5 minutes https://www.youtube.com/watch?v=hB7lNOCN2e8&feature=youtu.be
Master RxJS: Part 2 – What is an observer
This is the second post in the Master RxJS series. The first post is a video tutorial that explains, why RxJS Watch it here: https://www.youtube.com/watch?v=GfuGIh-Bmxw In this post, we will discuss an observer in RxJS. An observer is an object with three call-back functions to subscribe to the notifications from an Observable. Too much technical … Continue reading Master RxJS: Part 2 – What is an observer
How to make the length of an Array read-only in JavaScript
Sometimes, you may come across a requirement that once the array is created, its length should not be changed. In this blog post, let us explore how you can achieve that. Let us say you have an array as shown below, let foo = ['1', '11']; console.log(foo.length); // 2 console.log(foo[1]); //11 As you see, the length of the array is 2, and … Continue reading How to make the length of an Array read-only in JavaScript
Video- Master 3 important concepts of JavaScript
In this webinar learn 3 most important concepts of JavaScript. How to calculate the value of 'this' inside a function All about object literals function constructors and prototypes https://www.youtube.com/watch?v=F2V7MgehDSY
Link Constructors prototypes to create Inheritance in JavaScript
In JavaScript, there are multiple ways to create an object. However, among all the most popular is using a function as a constructor. A function returns a newly created object if it is called using the new, which is also known as Constructor Invocation Pattern. You can create a function constructor like any other … Continue reading Link Constructors prototypes to create Inheritance in JavaScript
How Object.entries work internally in JavaScript
In JavaScript, the Object.entries method returns an array of object’s own enumerable properties. It returns properties as a [key, value] pair, where the key is a string. You can read enumerable properties as an array of key-value pairs using the Object.entries method as shown below, let Product = { Title: 'Book', Price: 120, Author: undefined, inStock: true } console.log(Object.entries(Product)); Since it returns … Continue reading How Object.entries work internally in JavaScript
Video – Master RxJS: Part 1
Working with objects in a JavaScript Arrow Function
The JavaScript Arrow function is a shorter way of writing a function expression. Let us say you have a function expression as below, var add = function (num1, num2) { return num1 + num2; } The above function can refactor for a shorter syntax using the arrow function as below, var add = (num1, num2) => num1 + num2; So, as you see, the arrow function provides a convenient and short syntax … Continue reading Working with objects in a JavaScript Arrow Function
Video- High-level introduction of generator functions in JavaScript
This video gives very high level introduction of generator in JavaScript https://www.youtube.com/watch?v=zY1AaITBAMM