0

Javascript objects can accept an empty key with some value but how do we access the value of that empty key ?

var obj = {
    "": "Name"
}
Nina Scholz
  • 376,160
  • 25
  • 347
  • 392

1 Answers1

2

Try the following:

var obj = {"":"abc"};
console.log(obj[""]);
amrender singh
  • 7,949
  • 3
  • 22
  • 28