Meta | frontend | Phone screen

meta logo
meta
frontend
April 28, 20252 reads

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:

  1. Write Memoize function: https://www.greatfrontend.com/questions/javascript/memoize

  2. Write Classnames function: https://www.greatfrontend.com/questions/javascript/classnames

Interview Questions (2)

Q1
Implement Memoize Function
Data Structures & Algorithms

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.

Q2
Implement Classnames Function
Data Structures & Algorithms

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.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!