Meta | frontend | Phone screen
Summary
I had a phone screen interview at Meta for a frontend role, where I was asked to implement two JavaScript functions from scratch: Memoize and Classnames.
Full Experience
Both question where to write JS functions from stratch:
-
Write Memoize function: https://www.greatfrontend.com/questions/javascript/memoize
-
Write Classnames function: https://www.greatfrontend.com/questions/javascript/classnames
Interview Questions (2)
Implement Memoize Function
Write a JavaScript function from scratch to implement a memoize function. This function should cache the results of expensive function calls and return the cached result when the same inputs occur again.
Implement Classnames Function
Write a JavaScript function from scratch to implement the classnames utility. This function should take multiple arguments (strings, objects, arrays) and conditionally join them to form a CSS class string.