opencode/packages/codemode-rust/conformance/cases/destructuring-array.js
2026-11-18 18:53:56 +01:00

4 lines
136 B
JavaScript

const [first, , third = "t", ...others] = [1, 2, undefined, 4, 5]
let x = 1, y = 2
;[x, y] = [y, x]
return [first, third, others, x, y]