Have you come across a requirement to merge two or more arrays into another array? Let us say, you have two arrays as shown below, const metrocities = [‘Delhi’, ‘Mumbai’,’Chennai’,’Bangalore’,’Hyderabad’]; const smallcities = [‘Jamshedpur’,’Pune’,’Lucknow’,’Trivandrum’]; You need to merge them in another array with optional extra elements in the resultant array. JavaScript array spread operator makesContinueContinue reading “How to merge arrays using spread operator in JavaScript?”
Author Archives: Dhananjay Kumar
How to create Private Properties in JavaScript.
We don’t have Access Modifiers in JavaScript, and all properties of an object are public, which means you can read and modify them outside the object. But what if you have a requirement to create private properties? Consider Product object as mentioned below, let Product = { id: ‘1’, price: 200, title: ‘Pencil’ } console.log(Product.id);ContinueContinue reading “How to create Private Properties in JavaScript.”
How to use different syntax for Angular Interpolation
How to use different syntax for Angular Interpolation
Video- Simplifying Dependency Injection, Services, and Providers in Angular
This video explain DI, Services, and Providers in Angular
Video – Lazy Load a component in Angular 9
This video explains, How to lazy load a component in Angular 9. Following topics are covered in the video
Video- How to use JavaScript array find method
https://youtu.be/DgROCYkg-lU This video explains How to use JavaScript array find method
Video – Scoping and Hoisting in JavaScript
This video explains Scoping and Hoisting in JavaScript
Video – JSON.stringify() in JavaScript
This video explain in detail about JSON.stringify in JavaScript.
Video – slice method in JavaScript
Explain Object.keys in JavaScript
Enumerating through the properties of a JavaScript object is a persistent requirement. Hence it becomes a popular question in a JavaScript interview. Any good JavaScript developer must know about various available options. Note: You can find a video tutorial on the same at the end of the article. To start with considering the Dog objectContinueContinue reading “Explain Object.keys in JavaScript”