Learn some commonly asked JavaScript interview questions

What is javascript?

JavaScript is the Programming Language for the Web. It can update and change both HTML and CSS. It can calculate, manipulate and validate data.

JavaScript® (often shortened to JS) is a lightweight, interpreted, object-oriented language with first-class functions, and is best known as the scripting language for Web pages, but it’s used in many non-browser environments as well. It is a prototype-based, multi-paradigm scripting language that is dynamic, and supports object-oriented, imperative, and functional programming styles.

How JavaScript code executes

JavaScript is a asynchronous (Moves to the next line only when the execution of the current line is completed) and single-threaded (Executes one command…

VirtualDOM, Components, JSX, Props, States, Hooks, Side Effects, PropTypes, Data and Event Flow, Conditional rendering, React App Optimization

React JS is the most popular JavaScript Library for front-end development. It makes it easy to build Web UIs with less complexity, bypassing the direct manipulation of the DOM by the developers on their own. React’s speedy DOM manipulation (due to virtual DOM concept) and outcomes-based UI language (i.e. When actions happen to the state of a component, React takes care of updating the UIs in the DOM based on that) makes it so popular among the developers. Making cross platform apps for Web, Android and iOS is also made easy by React. …

Data Types, Event Loop, Try…Catch, Coding Style, Comment, Caching, Arrow Function, Block Binding, Spread Operator, Function Default Parameter

Data Types

JavaScript has total nine types of data or you may say values in two major categories. The primitive types and the Objects and Functions. Primitive types are values which we can use only not modify them. On the other hand, we can modify Objects and Functions as we want, anyway, anytime.

Primitive Types

● Undefined​ (undefined), used for unintentionally missing values.
● Null​ (null), used for intentionally missing values.
● Booleans​ (true and false), used for logical operations.
● Numbers​ (-100, 3.14, and others), used for math calculations.
● Strings​ (“hello”, “something”, and others), used for text.
● Symbols​ (uncommon), used to hide implementation details.
● BigInts​ (uncommon…

A List of String, Number, Math and Array Methods

String Methods: includes(), replace(), slice(), split()

includes(): This method is used to determine whether a search string is present in a given string and returns true if found and false if not. The includes() is a case sensitive method.

var str = “Hello world, from the medium blog.”;
var n = str.includes(“medium”);
console.log(n) // the output is 'true'
var n = str.includes(“Medium”);
console.log(n) // the output is 'false' due to case sensitivity

replace(): This method searches for a given string or a regular expression and returns the output string with replaced values. …

Muhammad Rabiul Alam

I am a Front-End Developer. I love to work with JavaScript, ReactJS, NodeJS, React Native and other front-end and/or JavaScript based technologies.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store