Front End Interview Questions | Glassdoor

Front End Interview Questions

2,099

Front end interview questions shared by candidates

Top Interview Questions

Sort: Relevance Popular Date

What is a JavaScript callback function?

4 Answers

5 vote down star 4 I understand passing in a function to another function as a callback and having it execute, but I'm not understanding the best implementation to do that. I'm looking for a very basic example, like this: var myCallBackExample = { myFirstFunction : function( param1, param2, callback ) { // Do something with param1 and param2. if ( arguments.length == 3 ) { // Execute callback function. // What is the "best" way to do this? } }, mySecondFunction : function() { myFirstFunction( false, true, function() { // When this anonymous function is called, execute it. }); } }; In myFirstFunction, if I do return new callback(), then it works and executes the anonymous function, but that doesn't seem like the correct approach to me.

I don't think Bloomberg is a very good company. I am an excellent web developer and have gotten multiple offers from other companies with big names, but was rejected by Bloomberg. They are too demanding during the job interview and it becomes a game of how well you can interview as opposed to how talented an employee you are and how much you can contribute to the growth of the company.

A callback function is a piece of JavaScript code that executes after the main function that the callback is attached to executes successfully.

Say there was a function that took 1 second to execute and you needed to run this function 10 million times, how would you cut down on the execution time?

1 Answer

If we wanted to implement a method of tracking every click that the user made on the site, how would we want to do this?

1 Answer

Given a number n where n+1 and n-1 are prime, prove n is divisible by 6

1 Answer

What is== and === operator?

1 Answer

As a designer, did I think I would get bored with coding and troubleshooting?

1 Answer

How to center a 200px x 200px div to the center of the screen?

1 Answer

Given an input array and another array that describes a new index for each element, mutate the input array so that each element ends up in their new index. Discuss the runtime of the algorithm and how you can be sure there won't be any infinite loops.

17 Answers

Design a data structure to store sparse 2D matrix which contains only 0 or 1. then write function to add 2 such matrix.

4 Answers

Find the Kth hisghest element in a given array.

5 Answers
110 of 2,099 Interview Questions