Hacker News new | ask | show | jobs
by theThree 438 days ago

    function f1(a:number, b:number, c:number, d:number) {
        [a, b] = [b, a]
        [c, d] = [d, c]
        console.log(a, b, c, d)
    }
For the above codes Typescript gives error message: Type 'number[]' is not assignable to type 'number'.