比如我有如下代碼var eightBall = { index: 0,advice: ["yes", "no", "maybe", "not a chance"],shake: function() {this.index = this.index + 1;if (this.index >= this.advice.length) { this.index = 0;} },look: function() {return this.advice[this.index];}};eightBall.shake(); console.log(eightBall.look());希望得到如圖結果:那么我需要多次執行最后一行代碼,在開發者工具中應該如何做呢?
如何在devtools中重復執行代碼?
SMILET
2019-02-13 18:19:38