with 运算符主要用去欺骗词法作用域。
// 将给定的表达式添加到在评估语句时使用的作用域链上。with (表达式) {执行语句}
var obj = {a:1,b:2}with (obj) {a=2b=3}console.log(obj) { a:2, b:3 }
var obj = {a:1,b:2}with (obj) {a=2b=3}console.log(obj) { a:2, b:3 }
with - JavaScript | MDN (mozilla.org)
精读《JS with 语法》 - 掘金 (juejin.cn)
