在JS中,如何通过取消构造另一个函数来重新声明函数参数变量?

I want to define a variable in a function signature and then re-assign that variable later. The following code is what I am trying to do, but am getting a Identifier 'b' has already been declared error:

async function test (a, b = 'myTest', c = undefined) {
  let { b, c } = normalizeInput(b, c)
  ...
}

目的是保留初始变量名。我怎样才能做到这一点?

Edit: if I remove the let, I get Unexpected token for the =.

评论