0

This code is used to filter the true values, I don't understand why that last array with zero is being used.

const rand = [{ inputNumber }, { inputBig }, { inputSmall }, { inputSymbol }]
  .filter(value => Object.values(value)[0])
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339

1 Answers1

0

That notation may be used to avoid to have to parse values when you need to remove symbols like quotation marks.

MAL
  • 143
  • 1
  • 14