Javascript Engineer Interview Questions | Glassdoor

Javascript Engineer Interview Questions

46

Javascript engineer interview questions shared by candidates

Top Interview Questions

Sort: Relevance Popular Date

What can you do to optimize JavaScript?

1 Answer

A1: Combine all the separate .js files into one big .js file. A2: Remove unneeded code, whitespace, semicolons and comments. A3: Use a tool like YUI Compressor to remove extra whitespace. A4: gzip the .js file

Write a function that accepts a single argument that returns a flattened array regardless of what argument type was passed in.

1 Answer

What is a DOCTYPE?

1 Answer

Write code that allows a user to go to a specific url and returns a JSON object containing the name and version of the current package (this was inside of their app that is in/near production and using the KOA framework---not Express)

1 Answer

Write pseudo code for a function that accepts a Board class that contains three public methods and will return whether the Board passed in is “solvable”. The three Board methods include “canMove” that accepts a direction parameter, move() that accepts a direction parameter, and “isSolvable” that returns a boolean of whether or not the board passed in is “solvable”.

1 Answer

How do you make a unicode string in python?

1 Answer

How do you handle exceptions?

1 Answer

Implement a Javascript Promise object.

1 Answer

Create a “debounce” function like the one provided by the underscore JavaScript framework that will take a function as the first parameter and return a function that will only be called once within the milliseconds of time (that is passed in as the second parameter).

1 Answer

Verbally explain how you would write unit tests for the function I wrote in question 3.

1 Answer
110 of 46 Interview Questions