0

I am new in react project, recently i find this codings of an const

const FILTER_TITLES = {
    [SHOW_ALL]: 'Toutes',
    [SHOW_ACTIVE]: 'En cours',
    [SHOW_COMPLETED]: 'Terminés',
}

Apparently the object FILTER_TITLES has properties with [ ] tags,

Can some expert explain this to me? As i know the Property name no need [ ] or just " " in JSON.

Thanks.

devserkan
  • 13,759
  • 4
  • 27
  • 37
enxi.L
  • 23
  • 4

0 Answers0