banner-image

4.6 Created by potrace 1.15, written by Peter Selinger 2001-2017

5.0 Created by potrace 1.15, written by Peter Selinger 2001-2017

4.6 Created by potrace 1.15, written by Peter Selinger 2001-2017

JavaScript Interview Questions JavaScript FAQ


Hi, Welcome to Monopoly IT Solutions, our Interview Questions / FAQs can be very helpful for interview preparation in several ways:

  • Understanding the way how Questions are asked by interviewer
  • Practicing Answers, find our appropriate ways of answeringand excel the interview
  • Gaining Insight into the industry standard
  • Reducing Anxiety of Interview
  • Self analysis of Key Skills

Following are the conceptual theory questions

    • JavaScript is a loosely-typed client side scripting language that executes in the user's browser. JavaScript interact with html elements (DOM elements) in order to make interactive web user interface.
    • JavaScript implements ECMAScript standards, which includes core features based on ECMA-262 specification as well as other features which are not based on ECMAScript standards.

  • Two types of DataTypes are there:
    • Primitive Types: number, string, boolean, null, undefined, symbol
    • Reference Types: Object, array

    • == : compares equality only with value
    • === : compares equality with value and type also

    • null -- variable is defined but absence of value.
    • undefined -- variable is not yet defined or so far no value is assigned to the variable

  • true -- evaluates as true because they are loosely equal.

  • false -- typeof null is object and typeof undefined in undefined

  • typeof is a JavaScript keyword that will return the type of a variable when you call it.

  • function

  • object

  • slice :
    • It returns a new array from existing array from specified starting position to ending position
    • It will not modify the original array.
  • splice :
    • It removes or adds elements from/to an array from specified position and specified number of elements
    • It modifies the original array.

  • map --It returns a new array which contains every element from the original array by performing some action
  • filter --It returns a new array which contains the elements satisfies the given predicate (condition)
  • reduce --It returns a single value by performing some calculation.

  • forloop --It iterates over a collection and it can be camcelled in middle by using break;
  • forEach --This is also used to iterate over a collection but it can not be cancelled in middle.

  • ShallowCopy --Only one instance will be available but its reference can be assigned to multiple reference variables
  • DeepCopy --We will have different memory locations for different instances

    • It is a function which returns an inside function
    • Inside function will have accessibility to the variables of outside function
    • Inside function will maintain the state between successive function calls
    • These are used to create a standalone isolated entities.

  • NaN -- is returned when you perform arithmetic operation on non numeric values.

  • number

  • asynchronous

  • Single Threaded

    • It is shortest syntax for normal functions.
    • It is always points to its parent scope because of that we can avoid using this object in arrow functions.

    • Prototype supports the concept of inheritance.
    • Javascript implements inheritance with the help of prototype only.
    • Classical inheritance can not be supported by javascript.

  • Using object literal -- used to create a singleton object
  • Using constructor -- we can create multiple objects using constructor
  • Object.create() -- while creating an object we can extend an existing object

  • Immediately invokable function expression.

  • JSON.parse(JSON.stringfy());

  • Passing a function as an argument to another function

    • The promise in object represents the eventual completion or failure of an synchronius operations and returns its resulting value
    • It returns only one value.
    • Promises will execute as an when we define
    • Promises can not be cancelled in middle
  • States of Promise :
    • pending
    • fulfilled
    • rejected

  • (...) It gives individual elements from a given array

  • (...) It gives an array from given individual elements.

  • Extracting the properties of an object and assigning to local variables.

    • Implicit type conversion in the javascript is called coiercing
    • 10-"20" --> -10

  • JavaScript Hoisting refers to the process whereby the interpreter appears to move the declaration of functions, variables, classes, or imports to the top of their scope, prior to execution of the code.

  • Use 'use strict' at the beginning of your files to prevent hoisting and enforce stricter code rules.

  • The async function declaration creates a binding of a new async function to a given name. The await keyword is permitted within the function body, enabling asynchronous, promise-based behavior to be written in a cleaner style and avoiding the need to explicitly configure promise chains.

Following are the coding based questions

getintouch

Book for Live Demo!