We're a place where coders share, stay up-to-date and grow their careers.
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!
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.
Awesome, thank you!
You're welcome!
What is the name for the
notation? I seem to have managed to avoid seeing this for years!
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.
Awesome, thank you!
You're welcome!