Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

toArray.js 273B

123456789101112
  1. import { reduce } from './reduce';
  2. function toArrayReducer(arr, item, index) {
  3. if (index === 0) {
  4. return [item];
  5. }
  6. arr.push(item);
  7. return arr;
  8. }
  9. export function toArray() {
  10. return reduce(toArrayReducer, []);
  11. }
  12. //# sourceMappingURL=toArray.js.map