I have stumbled upon this unexpected behavior in javascript
'use strict';
var _ = require('lodash');
_.map([1, 2, 3], function(x){console.log(x); });
_.map([1, 2, 3], console.log);
the two calls to map are behaving differently.
the first is printing the 1, 2, 3 line by line, whereas the latter call to map prints the iterator that map yields.
is there a more elegant way to write the first call? (without using es6 =>
operator)