Use spoiler flag next time please.
This comment is hidden because it contains spoiler information about the solution
Hahahah, 8000??? 🤯
22 tests? I'm passing 32 before timing out. How many tests are there?
Reference solution and submit tests have been updated for  => .
 => 
You're handling  but not .
It's the spread operator and no, you can't use an array there, the method won't work.
What does the ...arr mean? is it basically just saying to use that arr? do you have to put ...arr or can it be just arr?
I like this answer the best. Why use a car when your destination is only a meter away?
lol easiest way possible then I couldn't imagine this one xD. We Salute you! xd
O(2n) ~ O(n) :D :D :D
I assume ImmePak meant that the function iterates through the array twice: once to find the minimum, and again to find the maximum. Thinking about performance, it's theoretically unnecessary and somewhat inefficient to do that. (I don't know whether V8 optimizes it away; I assume not).
However, I find this solution simple and easy to read. If this function would be called infrequently and on small arrays, it would waste only an insignificant amount of time.
What do you mean by "array double check"?