Lodash interview questions
Practice 7 questions on lodash. Each runs in a real in-browser editor with Jest tests and a worked, diagram-backed solution.
7 questions
- JavaScriptCoding exercise
Array XOR (Symmetric Difference)
EASYImplement lodash xor — return the values that appear in exactly one of the given arrays, with duplicates removed.
20 minPractice - JavaScriptCoding exercise
Key By
EASYImplement lodash keyBy — index a collection into an object keyed by an iteratee's return, keeping the last item for each key.
15 minPractice - JavaScriptCoding exercise
Sum By / Mean By
EASYImplement lodash sumBy and meanBy — total and average an array by an iteratee that maps each element to a number.
15 minPractice - JavaScriptCoding exercise
Case Converters
MEDIUMConvert any string between camelCase, snake_case, kebab-case, and PascalCase by tokenizing it into words first.
35 minPremium questionPractice - JavaScriptCoding exercise
Object Path set / unset
MEDIUMImplement lodash-style set and unset: write or delete a value at a deep object path, creating containers as needed.
35 minPremium questionPractice - JavaScriptCoding exercise
Pull / PullAll
MEDIUMImplement lodash pull and pullAll — remove every occurrence of the given values from an array in place, mutating the original.
30 minPremium questionPractice - JavaScriptCoding exercise
Truncate String
MEDIUMImplement lodash truncate — cut a string to a maximum length, append an ellipsis, and optionally break on the last word boundary before the limit.
25 minPremium questionPractice