This post contains some practical and commonly asked coding problems that can be found in any technical interviews. So be not surprised while facing them.
Array.filter method, check each element's index is equal to the
indexOf value of the array.
Or in ES6 using set:
Given a string, print the reverse of the string (ex:
Without native methods:
Q1. What is Vue.js? What are the advantages of it?
Vue is a progressive framework used to building user interfaces.The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects.
Following are the advantages of using Vue.js.
Q1. What is MongoDB and Why we need MongoDB?
MongoDB is the most famous NoSQL open source database management system. It is written in C++ language and developed by MongoDB Inc.
MongoDB is a document oriented database which means it stores the data in BSON format which is a binary representation of JSON and it contains more data types than JSON.
Q1. What are the differences between
undefined means, the value of the variable is not yet defined. And
typeof undefined is also "undefined". We are getting
null means empty or non-existent value which is used to indicate “no value”. …
Q1. How React works? How Virtual-DOM works in React?
React creates a virtual DOM. When state changes in a component it firstly runs a “diffing” algorithm, which identifies what has changed in the virtual DOM. The second step is reconciliation, where it updates the DOM with the results of diff.
The HTML DOM is always tree-structured — which is allowed by the structure of HTML document. The DOM trees are huge nowadays because of large apps. Since we are more and more pushed towards dynamic web apps (Single Page Applications — SPAs), we need to modify the DOM tree incessantly…
Q1. What is ES or ECMAScript or ES6?
The ES6 is the sixth edition of the language and was released on June 2015. It was initially known as ECMAScript 6 (ES6) and later renamed…
Q1. What is Angular 4 and how it differs from Angular 1.x?
Angular 4 is a big change for us compared to 1.x. Because it is a completely different framework than 1.x, and is not backward-compatible. Angular 4 is written entirely in Typescript and meets the ECMAScript 6 specification. The main differences are:
Q1. What is TypeScript? Why should we use it?
Q2. What are Types in TypeScript?
The type represents the type of the value we are using in our programs. TypeScript supports simplest units of data such as numbers, strings, boolean as well as additional types like enum, any, never.
In TypeScript, we are declaring a…
Q1. What is Node.js? What is it used for?
Node.js can be used to build different types of applications such as web application, real-time chat application, REST API server etc. However, it is mainly used to build network programs like web servers, similar to PHP, Java, or ASP.NET. Node.js was developed by Ryan Dahl in 2009.
Q2. What is Event-driven programming?
Event-driven programming is building our application…
Q1. What are all the properties in Directive Definition Object?
Some of them are,
restrict - Restrict an element to one of the four types 'EAMC'.
replace - Boolean value. If
true the directive element (such as, <my-directive>) will be replaced with the template elements.
template - A string or a function that returns a string, that could be compiled into HTML elements. This template will be attached to the DOM.
templateUrl - A url in string or a function that returns the url. It will be fetched by the Angular compiler and will be attached to DOM.