How does hoisting work in JavaScript?
How do you compare two objects in JavaScript?
In order to test if two objects are equal in structure, a helper function is required. It will iterate through the own properties of each object to test if they have the same values, including nested objects
What is the reason for wrapping the entire contents of a JavaScript source file in a function that is immediately invoked?
This technique is very common in JavaScript libraries. It creates a closure around the entire contents of the file which creates a private namespace and thereby helps avoid potential name clashes between different JavaScript modules and libraries.
What is the difference between null and undefined?
-
typeof undefined evaluates to "undefined".
-
typeof null evaluates "object". However, it is still a primitive value and this is considered an implementation bug in JavaScript.
-
undefined == null evaluates to true.
Describe the different ways to create an object. When should certain ways be preferred over others?
Object literal
Constructor
Factory function
Object.create()
Does JavaScript pass by value or by reference?
JavaScript always passes by value. However, with objects, the value is a reference to the object.
Done
How Do We Import A Module In Angular 5?
Simply use below syntax to import a module in Angular 5.
import { ModuleName } from ‘someWhere’;
Explain $event In Angular 5?
In Angular 5 $event is a reserved keyword that represents the data emitted by an event (event data).
It is commonly used as a parameter for event based methods.
What Do Double Curly Brackets Are Used In Angular 5?
double curly brackets are used form data interpolation in Angular 5.
JS INT-04
By Tarun Sharma
JS INT-04
React
- 319