|
|
|
|
|
by joshuacc
4226 days ago
|
|
You can also handle problems like this via libraries. For example, underscore-contrib [1] does it this way: var x = _.getPath(a, "b.c.d");
There are definitely advantages to having this pattern baked into the language, though.[1] http://documentcloud.github.io/underscore-contrib/ |
|