map()

in code


Simple recursive array map.

function map(arr, callback) {
    return !arr.length ? [] : [callback(arr[0])].concat(map(arr.slice(1), callback));
}


Six Months in the Mountain Kingdom

in me


Your email address will not be published. Required fields are marked *