SyntaxFix
Write A Post
Hire A Developer
Questions
Swap the first and last element in an array without temporary variable or ES6 swap method [a, b] = [b, a]
[a.pop(), ...a.slice(1), a.shift()]