- 필수 기능
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- 디지털 경험
- 소프트웨어 제공
- 보안
- 로그 관리
- 관리
- 인프라스트럭처
- ci
- containers
- csm
- ndm
- otel_guides
- overview
- slos
- synthetics
- tests
- 워크플로
ID: javascript-best-practices/no-dupe-args
Language: JavaScript
Severity: Error
Category: Best Practices
In JavaScript, it’s syntactically valid to define multiple parameters with the same name in a function definition. However, doing so is considered bad practice as the last argument value will override the preceding argument value which can lead to issues that are hard to debug.
function a(a, b, b) {}
function a(a, a, a) {}
function a(a, b, a) {}
function a(a, b, a, b) {}
var a = function(a, b, b) {}
var a = function(a, a, a) {}
var a = function(a, b, a) {}
var a = function(a, b, a, b) {}
function a(a, b, c){}
var a = function(a, b, c){}
function a({a, b}, {c, d}){}
function a([ , a]) {}
function foo([[a, b], [c, d]]) {}
|
|
For more information, please read the Code Analysis documentation
Identify code vulnerabilities directly in yourVS Code editor
Identify code vulnerabilities directly inJetBrains products