Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text notes shift() instead of splice() used in the code #15

Open
MadRiver44 opened this issue Apr 4, 2017 · 0 comments
Open

text notes shift() instead of splice() used in the code #15

MadRiver44 opened this issue Apr 4, 2017 · 0 comments

Comments

@MadRiver44
Copy link

On page 39 of chapter 3, the text below the code for the insert function specifies shift(). It should be corrected to splice() as per the code example.

 function insert(element, after) {
     var insertPos = this.find(after);
      if(insertPos > -1) {
         this.dataStore.splice(insertPos+1, 0, element);
         ++this.listSize;
          return true;
         }
       return false;
}
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

No branches or pull requests

1 participant