Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 111: The Spread Operator (...)
Implement `conditionalClass(base, condition, extra)` returning `base` plus a space and `extra` when `condition` is true, otherwise just `base`.
+ 1 hidden test run on Submit.
A small helper that conditionally appends a modifier class, the simplest form of conditional styling.
Run your code to see results.