iT邦幫忙

0

JS 如何運行 DAY45

這裡要開始介紹 JS核心/images/emoticon/emoticon08.gif
首先要先來介紹
JS究竟是怎樣運行的/images/emoticon/emoticon06.gif

其實瀏覽器(Browser)是看不懂 JS 的
必須透過 直譯器 解譯

JS屬於 直譯式語言(Interpreted language)
執行前是未經過被編譯的


  • 編譯式語言:

https://ithelp.ithome.com.tw/upload/images/20201013/20123039LZl5l6Byic.jpg

效能較好

  • 直譯式語言:

https://ithelp.ithome.com.tw/upload/images/20201013/20123039DYdEVnfee1.jpg

彈性高
不須預先定義型別


https://ithelp.ithome.com.tw/upload/images/20201013/20123039ySac6IxucB.jpg

語法單元化:
將字詞轉成 Token

這裡要注意
抽象結構樹 的時候
尚未運行程式碼
真正運行程式碼
是在 代碼生成 之後

這裡提供一個 編譯網站
https://esprima.org/demo/parse.html#

語法單元化:
https://ithelp.ithome.com.tw/upload/images/20201013/20123039ZwaTrxGgkV.jpg
抽象結構樹:
https://ithelp.ithome.com.tw/upload/images/20201013/20123039i45M65aU11.jpg

那今天的介紹就到這裡啦
明天將介紹 LHS RHS
若有任何問題 或 內容有誤
都可以跟我說唷/images/emoticon/emoticon07.gif


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言