SyntaxFix
Write A Post
Hire A Developer
Questions
One other way, using the splat operator:
*a, last = [1, 3, 4, 5] STDOUT: a: [1, 3, 4] last: 5