Frontend Engineer Interview Questions

13,275 frontend engineer interview questions shared by candidates

Task Runner with concurrent limit [Javascript] The problem was to complete the add function for Runner class. concurrent limit will determine the number of task Runner can run in parallel. If the concurrent limit is reached by Runner, rest of the tasked should be queued and only to be executed once the first set of task are completed. ------------------------------------------------------------- class Runner { constructor(concurrent) { } add(task) { // Add your code here. } } function task(x) { return function() { return new Promise((resolve, _) => { setTimeout(() => { console.log('task completed', x); resolve(); }, 2000); }) } } runner = new Runner(3); runner.add(task(2)) runner.add(task(2)) runner.add(task(2)) runner.add(task(4)) runner.add(task(4)) runner.add(task(4)) runner.add(task(6)) runner.add(task(6)) runner.add(task(6))
avatar

Senior Frontend Engineer

Interviewed at Miro

3.6
Jan 5, 2022

Task Runner with concurrent limit [Javascript] The problem was to complete the add function for Runner class. concurrent limit will determine the number of task Runner can run in parallel. If the concurrent limit is reached by Runner, rest of the tasked should be queued and only to be executed once the first set of task are completed. ------------------------------------------------------------- class Runner { constructor(concurrent) { } add(task) { // Add your code here. } } function task(x) { return function() { return new Promise((resolve, _) => { setTimeout(() => { console.log('task completed', x); resolve(); }, 2000); }) } } runner = new Runner(3); runner.add(task(2)) runner.add(task(2)) runner.add(task(2)) runner.add(task(4)) runner.add(task(4)) runner.add(task(4)) runner.add(task(6)) runner.add(task(6)) runner.add(task(6))

taskRunner.add(logAfterDelay("Delayed by 4")); taskRunner.add(logAfterDelay("Delayed by 4")); taskRunner.add(logAfterDelay("Delayed by 4")); taskRunner.add(logAfterDelay("Delayed by 6")); taskRunner.add(logAfterDelay("Delayed by 6")); taskRunner.add(logAfterDelay("Delayed by 6")); // --- Helpers --- const startingTime = Date.now(); function logAfterDelay(logString) { return () => { return new Promise((resolve, reject) => { setTimeout(() => { console.log(logString, getDelay(startingTime)); resolve(); }, 2000); }); }; } function getDelay(startingTime) { return [${Math.round((Date.now() - startingTime)/1000)}s delay]; }
avatar

Senior Frontend Engineer

Interviewed at Miro

3.6
Jan 25, 2022

taskRunner.add(logAfterDelay("Delayed by 4")); taskRunner.add(logAfterDelay("Delayed by 4")); taskRunner.add(logAfterDelay("Delayed by 4")); taskRunner.add(logAfterDelay("Delayed by 6")); taskRunner.add(logAfterDelay("Delayed by 6")); taskRunner.add(logAfterDelay("Delayed by 6")); // --- Helpers --- const startingTime = Date.now(); function logAfterDelay(logString) { return () => { return new Promise((resolve, reject) => { setTimeout(() => { console.log(logString, getDelay(startingTime)); resolve(); }, 2000); }); }; } function getDelay(startingTime) { return [${Math.round((Date.now() - startingTime)/1000)}s delay]; }

Take home task was standard client side frontend application consuming a public API. Shared deployed url and code via GitHub. Code was reviewed in isolation (no chance for feedback / address issues) by a less experienced frontend developer (which fits with why they are trying to fill this role). Feedback indicated that the reviewer was unable to understand interesting code design choices and instead made incorrect or basic comments e.g. "split into more files".
avatar

Senior Frontend Engineer

Interviewed at Synthesia

4.4
Sep 20, 2023

Take home task was standard client side frontend application consuming a public API. Shared deployed url and code via GitHub. Code was reviewed in isolation (no chance for feedback / address issues) by a less experienced frontend developer (which fits with why they are trying to fill this role). Feedback indicated that the reviewer was unable to understand interesting code design choices and instead made incorrect or basic comments e.g. "split into more files".

In Technical round, They asked to fetch data from the api they have given, I mostly use functional component but they asked me to use class components , and then sort that data on click, also they asked a little bit nodejs too.
avatar

Frontend Engineer

Interviewed at U.S. News & World Report

2.9
Nov 7, 2022

In Technical round, They asked to fetch data from the api they have given, I mostly use functional component but they asked me to use class components , and then sort that data on click, also they asked a little bit nodejs too.

Viewing 981 - 990 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 13,275 interview questions and reports from Frontend engineer interviews. Prepare for your interview. Get hired. Love your job.