You are viewing a single comment's thread. Return to all comments →
One line of JS, no looping:
.join(' ') goes one parentheses out hehe
aaah - good call on not using loops! I updated my ruby version to just work with arrays directly.
Yeah not sure what k is here
One step forward with spread operator:
return [...a.splice(d, a.length - 1), ...a];