Skip to content

Comments

Lab david#18

Open
austriker27 wants to merge 14 commits intocodefellows-seattle-javascript-401d19:masterfrom
austriker27:lab-david
Open

Lab david#18
austriker27 wants to merge 14 commits intocodefellows-seattle-javascript-401d19:masterfrom
austriker27:lab-david

Conversation

@austriker27
Copy link

No description provided.

if(typeof callback !== 'function')
throw new TypeError('<callback> should be a function!');
return Array.prototype.slice.apply(this, [begin, end, collection]);
if(typeof callback !== 'object')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did changing these lines and reordering where the collection is passed change anything?

Copy link
Author

@austriker27 austriker27 Dec 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to

fp.slice = (begin, end, collection) => {
  if(typeof callback !== 'object')
    throw new TypeError('<collection> should be an array like object');
  return Array.prototype.slice.call(collection, begin, end);
};

thinking I was checking for the wrong type but alas it throws an error. I dont think I understand where else I could pass the collection in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants