Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 111: The Spread Operator (...)
Implement `classNames(map)` returning a space-separated string of the keys whose values are truthy.
+ 1 hidden test run on Submit.
Filtering object keys by truthy value and joining with spaces builds a className string conditionally, the core of utilities like clsx.
Run your code to see results.