Meta | frontend | Phone screen
- Posted
- 28 Apr 2025
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.
How it went
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
Questions asked (2)
- 01
Implement Memoize Function
Data Structures & Algorithms
Open the problemWrite 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.
- 02
Implement Classnames Function
Data Structures & Algorithms
Open the problemWrite a JavaScript function from scratch to implement the
classnamesutility. This function should take multiple arguments (strings, objects, arrays) and conditionally join them to form a CSS class string.