1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
// #1 function base() { } base.prototype = { test() { --super[1]; } } var d = new base(); d.test(); // #2 class test2 { test() { super[1]++; } } var d = new test2(); d.test() if (typeof reportCompare === 'function') reportCompare(0,0,"OK");