DEV Community

loading...

Discussion on: Daily Challenge #56 - Coffee Shop

Collapse
georgecoldham profile image
George

What is the name for the

{a:'A', b:'B', c:'C'}[value]

notation? I seem to have managed to avoid seeing this for years!

Collapse
aayzio profile image
aayzio • Edited

The {} operator would define a map. In the solution that would be a map of float type keys for string type values. The [ ] is then used to access a particular key.

Thread Thread
georgecoldham profile image
George

Awesome, thank you!

Thread Thread
aayzio profile image
aayzio

You're welcome!