Closed mikegowen closed 6 years ago
Is there a reason these are different?
No, they'll behave the same. But I guess having the arguments in there is helpful for showing people how the function will be used. Attached patch adds them to the first example.
In the
Matrix
class constructor, you set the default for the content parameter like this:constructor(width, height, content = () => undefined)
(i.e. no parameters in the function)But then in the
SymmetricMatrix
class constructor, set the default for the content parameter like this:constructor(size, content = (x, y) => undefined)
(i.e. x and y parameters in the function)Is there a reason these are different?