Skip to content

Conversation

@agurusa
Copy link

@agurusa agurusa commented May 10, 2016

var new_task = new Task(task)
this.tasks.push(new_task);
var index = this.tasks.indexOf(new_task);
new_task.id = index + 1;
Copy link

Choose a reason for hiding this comment

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

using this.tasks.length + 1 allows you to avoid line 8

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