function f1(a:number, b:number, c:number, d:number) { [a, b] = [b, a] [c, d] = [d, c] console.log(a, b, c, d) }