--- tags: JS 直播班 - 2022 秋季班 --- # 核心篇第六堂:this 與原型鏈 > 能力爆發的章節   ## 關於 This - 全域:不要用就對了 - 直接呼叫(前方無物件)、callback function、立即函式 - use strict:https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Strict_mode - 作為物件:**函式內的 this 是指向函式前方的物件** - this 的指向在於如何呼叫它 - 箭頭函式:**箭頭函式沒有自己的 this(指向其作用域的 this)** - new 建構子:新建立的物件傳入函式作為 this - bind, apply, call(強制綁定 this,本次課程不介紹) ## 原型鏈 什麼是原型鏈 - 哪裡會看到原型鏈 - 原型鏈架構(原型是共用的) - 客製化原型鏈 - 原型繼承(為 Object 新增的方法,所有原型都會套用) ### 函式建構子 > 函式建構子就如同設計圖一般,可以用於生產大量的產品 - this, function 與 new - prototype - 原型繼承 - class
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up