Skip to content
This repository was archived by the owner on Aug 31, 2019. It is now read-only.

Conversation

@ceylonsullen
Copy link

No description provided.

// console.log(i);
// console.log(x[i]);
// console.log(typeof x[i]);
if (typeof x[i] === 'object') {
Copy link
Contributor

Choose a reason for hiding this comment

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

A better way to check if something is an array is to use Array.isArray.

let count = 0;
const obj = {
increment() {
count++;
Copy link
Contributor

Choose a reason for hiding this comment

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

Here you can just do return count++; and return count--; for these functions.

var args = Array.prototype.slice.call(arguments);
return cb.apply(null, args.splice(1));
};
console.log(addArgs(1, 2, 3))
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to remove console logs before committing your code.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants