Front End Engineer Interview Prep

Here are the most common topics covered in Front End Engineer Interviews today.

POST vs GET

The main differences between POST and GET HTTP calls are listed below.

POST                                                                           GET

  • Can’t be Cached                                                    Can be cached
  • Can’t be bookmarked                                         Useful for bookmarking
  • Suitable for sensitive data like logins         Not suitable for sensitive data
  • Used for posting data                                         Used to retrieve data

Observables vs Promises

The main differences between Observables and Promises are listed below.

Observables                                                                  Promises

  • Used for a stream of events                               Used for a single event
  • Need to subscribe to consume data              Subscription not required
  • Can be cancelled                                                      Can’t be cancelled

ES6 (ECMA Script 2015)

Some of the most important ES6 changes are listed below.

Default Parameters

Spread Syntax

Template Literals & Multiline Strings

Destructuring Assignment

Object Literals

Arrow Function

Promises

let & const

let let’s you scope variables in a block and const lets you define constants that you will no longer make changes to.

classes

Export & Import statements

Passing an Object vs Primitive data type in Javascript

Javascript call() vs apply() vs bind()

Closure

This property of Javascript allows for private variables in a function. For example

Demo

This is one common scenario you might run into when you use async calls inside a loop. The loop executes before the async call returns and the desired output is not logged.

Demo

Output

Using closure we can handle this in the following way

Demo

Output

Hoisting

The variables in javascript can be declared even after they are used as they are moved to the top of the code during execution. Hoisting doesn’t take place for initializing though. The same goes with function hoisting.

Note: There is no variable/function hoisting in ES6.

Strict Mode

When ‘use strict’ is used you will need to declare variables while using them. There are other rules such as not being able to delete objects etc when using this mode.

 Bubbling vs Capturing

Event propogation can be of 2 types Bubbling and Capturing.

Bubbling

In Bubbling type of event propogation, the event propogation occurs starting from the inner element to the outermost element.

Capturing

In  Capturing type of event propogation, the event propogation starts from the outermost element to innermost element. This is also known as Trickling.

Arguments

Arguments are “array-like” in the sense that it has length and elements accessible by index. It doesn’t have foreach or map.

State Management (Immutable objects)

Debounce

Throttling

Currying

Copy to clipboard

ES7 & ES8

Read about the more recent Javascipt versions.
ES7, ES8.

Subject

They are very similar to observables.

Others

Some other topics you might want to be familiar with are CORS issue, preflight options, HTTP call,  Change Detection, framework lifecycle, TypeScript 2, Angular 5, React/Redux, Vue 2, webpack, babel, gulp, npm, etc.