// You can apply Array.prototype.push to a string; it does ToObject on // it. But as the length property on String objects is non-writable, // attempting to increase the length will throw a TypeError.
cv = usingApply
? push.apply("hello", ["world"])
: push.call("hello", "world");
assertEq("throw" in cv, true); var ex = cv.throw;
assertEq(frame.evalWithBindings("ex instanceof TypeError", { ex: ex }).return, true);
};
g.eval("var a = []; f(Array.prototype.push, a);");
assertEq(g.a.length, 4);
assertEq(g.a.slice(0, 3).join(","), "0,1,2");
assertEq(g.a[3], g.a);
}
test(true);
test(false);
Messung V0.5
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.