Underscore.js 1.7の使い方 Arrays編 flatten

var r = document.getElementById("r");
r.innerHTML = _.flatten([1, [2, 3], [[4]]]);
// => [1, 2, 3, 4]