How to use passed on variables to a function globally?

前端 未结 0 1781
日久生厌
日久生厌 2021-02-13 06:46

I have a little code as such :

 function test(a, b) {
    return a + b;
  }
  const res = test(1, 4);
  console.log(res)

I wish to use a

相关标签:
回答
  • 消灭零回复
提交回复
热议问题