Files
codeql/javascript/ql/test/query-tests/Expressions/UnneededDefensiveProgramming/tst2.js
2025-02-28 13:27:28 +01:00

19 lines
346 B
JavaScript

(function(){
var v;
(function(){
if(typeof v === "undefined"){ // $ Alert
v = 42;
}
for(var v in x){
}
});
});
const isFalsyObject = (v) => typeof v === 'undefined' && v !== undefined;
function f(v) {
if (typeof v === 'undefined' && v !== undefined) {
doSomething(v);
}
}