Skip to content

Instantly share code, notes, and snippets.

@gotoweb
gotoweb / extractColumn.js
Created February 16, 2016 05:53 — forked from eddieajau/extractColumn.js
Extract a column from an array of JavaScript objects.
function extractColumn(arr, column) {
function reduction(previousValue, currentValue) {
previousValue.push(currentValue[column]);
return previousValue;
}
return arr.reduce(reduction, []);
}
@gotoweb
gotoweb / app.js
Created February 6, 2013 07:41 — forked from nervetattoo/app.js
define(['dependency'], function(Dependency)
{
console.log("Dependency loaded", Dependency);
});