var a = /123/, b = /123/; console.log([a == b, a === b]); // 缺分号会报错 (function(){ var x = y = 1; })(); console.log(y); //console.log(x);