because of the closure, js can not modify the parameter in place.
are there any js answer which passed all the tests?
Sorry, but you make no sense. And yes, there are accepted js answers. Show your code, maybe then we can tell you what you're doing wrong.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.