Files
codeql/javascript/ql/test/query-tests/Declarations/DeadStoreOfGlobal/with.js
2018-08-02 17:53:23 +01:00

14 lines
156 B
JavaScript

function f(o) {
with (o) {
x = 42;
return function () {
x = 56;
};
}
}
var q = { x: 23 };
var h = f(q);
alert(q.x); // 42
h();
alert(q.x); // 56