这是关于JSON响应被盗的John Resig's blog:
// From Joe Walker function Array() { var obj = this; var ind = 0; var getNext = function(x) { obj[ind++] setter = getNext; if (x) alert("Data stolen from array: " + x.toString()); }; this[ind++] setter = getNext; } var a = ["private stuff"]; // alert("Data stolen from array: private stuff");
正如问题标题所述,我无法弄明白obj[ind++] setter = getNext;
答案 0 :(得分:0)
它只是伪代码,javascript从未有过这样的语法。 虽然现在javascript确实有某种形式的getter / setter,但它现在还没有回来。