I would use rest parameter instead arguments magic value :
arguments
const maxValue = (...values) => values.reduce((acc, val) => val > acc || acc === null ? val : acc , null);
Should be acc === null right? :-)
acc === null
Indeed 👍 ! fixed 😉
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I would use rest parameter instead
arguments
magic value :Should be
acc === null
right? :-)Indeed 👍 ! fixed 😉