score:0

Accepted answer
let myWeatherClasses = classNames(
  {
    'rainy': description.indexOf('rain') > 0,
    'cloudy': description.indexOf('cloud') > 0,
    ...
  }
);

Related Query

More Query from same tag