0

I've seen this example but cant find any docs as to why this happens. wrapping the const in brackets creates an object like below. can anyone enlighten me

const test = "some text"

console.log({test})

{test: 'some text'}
Barmar
  • 741,623
  • 53
  • 500
  • 612
blu10
  • 534
  • 2
  • 6
  • 28

0 Answers0