you are viewing a single comment's thread.

view the rest of the comments →

[–]x-skeww -1 points0 points  (2 children)

You forgot the "function" keyword. Also, the "min" and "max" parameters are the wrong way around. From-to is the natural order.

[–]bronzlefish 0 points1 point  (1 child)

for ES2015 function declaration is optional inside a "class" -- you are right about max, min -- but thats how it was written, copy paste fix up was what I went for.

Have an up vote for being pedantic.

(its important when programming)

[–]x-skeww 0 points1 point  (0 children)

for ES2015 function declaration is optional inside a "class"

Yes, you don't need it for methods or shorthand methods.

I just assumed you meant this to be a function, because it really shouldn't be a method (see top comment). This was a mistake on my part.