# 第三十九關 箭頭函式(arrow function) 技術主管看到小杰[第 18 關](https://hackmd.io/@YmcMgo-NSKOqgTGAjl_5tg/Sk-_oGL2U/https%3A%2F%2Fhackmd.io%2FjXltRFJ4SEufv6LyFZZ4zQ)的 Code 後,覺得非常吐血。 他說現在公司都用所謂的**箭頭函式(arrow function)**,所以希望小杰也將 18 關的程式碼的 forEach 改為箭頭函式寫法,但小杰從來沒寫過什麼箭頭寫法,一起來幫幫小杰尋找資源吧! ## 問題 1. 如果你是初學者,請回傳第 18 關的 forEach ,改用箭頭函式的寫法來撰寫 2. 假使你已經會箭頭函式,請分享 arrow function 會如何影響到 `this` ## 文章分享 請將你紀錄的 HackMD 筆記,以及你找的技術文章分享到此,讓其他參賽者有更多資源可以參考 * [JavaScript ES6 Arrow Functions 箭頭函數](https://www.fooish.com/javascript/ES6/arrow-functions.html) * [鐵人賽:箭頭函式 (Arrow functions)](https://wcc723.github.io/javascript/2017/12/21/javascript-es6-arrow-function/) * [this是甚麼?](https://grantliblog.wordpress.com/2020/01/23/this-%E6%98%AF%E4%BB%80%E9%BA%BC%EF%BC%9F-%E8%AB%87%E8%AB%87javascript%E7%9A%84this/) * [談談 JavaScript 中的 "this" 和它的問題](https://pjchender.blogspot.com/2016/03/javascriptthisbug.html) * [ JavaScript ES6 中的箭頭函數(arrow function)及對 this 的影響](https://pjchender.blogspot.com/2017/01/es6-arrow-function.html) * [鐵人賽:JavaScript 的 this 到底是誰?](https://wcc723.github.io/javascript/2017/12/12/javascript-this/) * [重新認識 JavaScript: Day 20 What's "THIS" in JavaScript (鐵人精華版)](https://ithelp.ithome.com.tw/articles/10193193) * [Function 內的 this 到底是哪個 this](https://www.spreered.com/arrow-function-this/)
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.