Javascript this到底是什麼, 應該怎麼用?

1.應用場景 學習前端知識, 弄清楚this,有助於我們進行前端項目開發, 提高效率以及少踩坑. 2.學習/操作 整理後發出 ...     備用代碼:   function Counter() {   this.sum = 0;   this.count = 0; } Counter.prototype.add = function(array) {   console.log(this);  
相關文章
相關標籤/搜索