se-edu/learningresources

Incorrect code in javascript.md#writing-reusable-javascript

Closed this issue · 0 comments

Quote from chapter:
https://github.com/se-edu/learningresources/blob/master/contents/javascript/javascript.md#writing-reusable-javascript

Method chaining is syntax such as array.concat([1, 2]).push(1).filter(isEven)

image

However, Array.prototype.push doesn't return an array, the above code doesn't do what it intends to do.