Interviews

All the questions to prepare for your next Frontend Interview

I will briefly describe the most frequently asked Interview Questions for a Frontend or Senior Frontend Role. Array · Difference b/w Map,...

Written by Luci · 1 min read >

I will briefly describe the most frequently asked Interview Questions for a Frontend or Senior Frontend Role.

Array

· Difference b/w Map, Filter, Reduce

· Remove duplicates from an array

· Count no of Duplicates found in an array. Try making an object with the key as an array element and the value as no. of duplicates found.

· Reverse words of the array Ex: If [ “abc”, “def”] then show output as [“cba”, “fed”]

· Reverse words of the array and reverse the whole array Ex: If [ “Hello”, “World”] then show output as [“dlrow, “olleh”]

· Array Slice and Splice methods

· Find min & max elements in an Array

· Rotate array by 1 Ex: if [ 1,2,3,4] then show o/p as [4,1,2,3]

· Add Element to first and last without using in-built functions.

· Min and max element in an array

String

· Reverse a String

· Remove duplicates in string

· Change the characters of the string to the opposite case. Ex: If lower case character is found change to UPPER case, and vice-versa.

· String in-built methods

· Longest Common Substring (Hard level — Low probability of getting in the interview)

Objects

· Sort an Array of objects

· Copy an object, Delete, add Dynamic key and values, loop through objects

· Object Binding

· Prototypal Inheritance

Most of the solutions to these Array, Object, and Strings are in my GitHub repo here:

https://github.com/FiREMiNT/array_and_strings

JS Core Concepts

The most imp part of an interview aka having strong JS knowledge

· Some browser concepts like Event loop, microtask queue v/s callback queue.

· Basic working of JS Engine.

· Variable Scope and Hoisting. Many o/p based questions come from this topic

· Currying “One of the most imp topics”. Give an example of the curry function. Make a curry function that is flexible with no. of parameters. Make a curry fun that takes 5 arguments but in any form. ex: myFunc(1,2,3,4,5)/ myFunc(1)(2)(3)(4)(5)/ myFucn(1,2)(3,4)(5). (asked in Walmart, PhonePe)

· Closures

· Pure Functions/ First Class Functions.

· Debouncing and throttling.

· Call v/s Apply v/s Bind

· Event bubbling, Event capturing, Event Delegation

· Local Storage and Session Storage

· Rest and Spread Operators

· Callback Functions, Promises, Async-Await, try-catch block.

· Make Polyfills for Bind, Promise.All

· O/P based questions on Implicit coercion, typeOf function.

· Form/ Input Validations

Network / Asset Optimization

(expected from senior-level programmers)

· Lazy Loading

· Async Defer

· Content Visibility

· Serving critical JS/CSS

· Resource hints

· Caching

· Service Workers

· Client-side Rendering, Server-side Rendering

· File Compression techniques

· Optimizing Videos, Images, Font

Higher-level topics

should be covered after covering the above topics thoroughly

· Testing using Frameworks

· Typescript

· React or Angular framework in detail

· Core web-vitals

· Critical Rendering Path https://web.dev/critical-rendering-path-analyzing-crp/

· Generic Functions

· Performance Tools

· CORS

· HTTP, Network Layer

· NPM, Babel, Webpack

· Routing

· Namespaces

· Web Accessibility

· Singleton Class

· JSON Web Tokens (JWT)

HTML / CSS

Only basic questions here like what is Flexbox in CSS and what are Semantic Tags etc. Not the go-to area to prepare that’s why it’s at the end of the document.

Written by Luci
I am a multidisciplinary designer and developer with a main focus on Digital Design and Branding, located in Cluj Napoca, Romania. Profile

12 useful JavaScript interview tips

Luci in Interviews
  ·   9 min read

Javascript interview questions

Luci in Interviews
  ·   3 min read