Problem

Return copy with first and last swapped.

Examples

  • swapFirstLast([1, 2, 3]) -> [3, 2, 1]
Compile and test (Ctrl+Enter)