Angular Interview : is Angular Service Singleton ?

One of the most popular Angular interview questions is, whether a service is singleton? By default, when you create a service using the below CLI command, ng g s app AppService is singleton, however it can be re-provided to create more objects of it. Say, you again re provide AppService in one of the components, … Continue reading Angular Interview : is Angular Service Singleton ?

Always Use the for…of loop to iterate in JavaScript

In JavaScript to iterate over the values of an array, map, object, etc. use the for…of loop. In a specified order, it iterates over the set of values of an iterable object such that array. It would be best if you use a for…of loop for looping. You must have used the for…in loop to … Continue reading Always Use the for…of loop to iterate in JavaScript

Video – Step by Step using TypeScript in a Node.js Application

This video explains steps to use TypeScript in a Node.js application. You can read step by step article on the same here -  here Download source code from here https://www.youtube.com/watch?v=fOkAMBVyuo0   To start with create a folder and run npm init command inside the folder. After that install these dependencies,  npm install -D typescript npm install … Continue reading Video – Step by Step using TypeScript in a Node.js Application

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. https://youtu.be/1nG3FKN3KjU   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 … Continue reading Video- Why You need the apply() and the call() methods in JavaScript