/** * @module 1-liners/nth * * @description * * Returns the nth item of an array. * * @example * * const nth = require('1-liners/nth'); * * nth(1, [1, 2, 3]); // => 2 * */ export default (n, arr) => arr[n];