The map
function in underscore.js, if called with a javascript object, returns an array of values mapped from the object\'s values.
_.map({one:
_.map returns an Array, not an Object.
If you want an object you're better off using a different function, like each
; if you really want to use map you could do something like this:
Object.keys(object).map(function(value, index) {
object[value] *= 3;
})
but that is confusing, when seeing map
one would expect to have an array as result and then make something with it.