View array.flatten.js
'use strict';
/**
* Flattens a deep-nested array of integers (numbers)
* @param {Number[]} inpArray A possibly deep-nested array of numbers.
* The level of nesting is limited by the maximum stack size of the
* JavaScript engine (the lowest we have seen is IE6 at 1130)
* @return {Number[]} Returns a flattened version of the input array
*/
function flatten (inpArray) {
View nextTick.js
for (var i = 0; i < 1024 * 1024; i++) {
process.nextTick(function () { Math.sqrt(i) } )
}