- function to reverse a string - function to sum an array of integers - function to get a deeply nested property value from an object
Since I work a lot with React and also interview people for that, I use the following to determine if people are at least somewhat familiar with react:
- take a static array of objects (first name, last name) and render a list of those objects
If people can’t write the map function, or are confused about the console warning for needing “key” that is usually a great indicator that they don’t actually know react.
What consistently surprises me is that I’ll interview people with 5-10 years of directly related experience, who will see questions like this and laugh or say it’s trivial, and then absolutely bomb. One person complained that they were senior and above these types of questions, and then spent 20 minutes trying to reverse a string.