function map(callback, data) {
  const result = [];

  for (let i = 0, l = data.length; i < l; i += 1) {
    result.push(callback(data[i]));
  }

  return result;
}
/**
 * Creates a new array with the results of calling a provided function on every element in the calling array.
 *
 * @since v1.0.0
 * @category Array
 *
 * @param {fn} callback function that will be called on each element
 * @param {Array} data
 * @return {Array}
 *
 * @see withIndex
 *
 * @example
 * N.map((val) => val * 2, [1, 2, 3]); // -> [2, 4, 6]
 * N.map((name) => `Hello, ${name}!`, ['nier', 'you']); // -> ['Hello, nier!', 'Hello, you!']
 */
Creates a new array with the results of calling a provided function on every element in the calling array.

@param {fn} callback function that will be called on each element
@param {Array} data
@return {Array}

@see withIndex


Creates a new array with the results of calling a provided function on every element in the calling array . @param { fn } callback function that will be called on each element @param { Array } data @return { Array } @see withIndex
function map(callback, data) {
  const result = [];
  for (let i = 0, l = data.length; i < l; i += 1) {
    result.push(callback(data[i]));
  }
  return result;
}
function map ( callback , data ) { const result = [ ] ; for ( let i = 0 , l = data . length ; i < l ; i += 1 ) { result . push ( callback ( data [ i ] ) ) ; } return result ; }
Creates a new array with the results of calling a provided function on every element in the calling array.
Creates a new array with the results of calling a provided function on every element in the calling array .