user3249433 user3249433 - 3 months ago 19
Javascript Question

Practice lodash on jsfiddle

I am trying to practice my lodash skills on jsfiddle.net.

I am trying simple copy paste of the following code

_.map([1, 2, 3], function(n) { return n * 3; });


By setting the framework options library to lodash 2.2.1 and pressing the run button however nothing happens i dont get any output any ideas please ?

Answer

You are not outputting anything to see.

jsFiddle !== console. If you want to see what happens, you need to log it.

var x = _.map([1, 2, 3], function(n) { return n * 3; });
console.log(x);

This also assumes you have the fiddle set up correctly.

JSFiddle