[好文推薦] 30 天學會 JavaScript!免費!全中文喔!
文章連結:https://goo.gl/UN7EBZ
--------(本文開始)--------
今天推薦的是由「IT 邦幫忙」網站的一個系列文:「I Want to Know JS」。它用 30 + 2 篇幅,很完整地介紹了 JavaScript。如果想學 JavaScript 的朋友,不妨閱讀看看!
前面的 30 篇,分別是介紹 JavaScript 的正文。分別是:
01. Why Do I Want To Know JS
02. JavaScript - 原始型別概述
03. JavaScript - Built-In Objects 概述
04. JavaScript - 原始型別個別介紹
05. JavaScript - 物件 與 屬性
06. JavaScript - 變數
07. JavaScript - 參數傳遞方式 (1)
08. JavaScript - 參數傳遞方式 (2)
09. JavaScript - Function
10. JavaScript - Lexical Scope
11. JavaScript - Scope 單位 & 查找
12. JavaScript - Hoisting
13. JavaScript - Closure (1)
14. JavaScript - Closure (2)
15. JavaScript - Scope 實作建議
16. JavaScript - call,apply,bind
17. JavaScript - This (1)
18. JavaScript - This (2)
19. JavaScript - This Priority
20. JavaScript - 物件導向 (1)
21. JavaScript - 物件導向 (2) - 建立共用函式
22. JavaScript 物件導向 (3) - 繼承原型方法
23. JavaScript 物件導向 (4) - With ES6
24. JavaScript - Prototype Chain
25. JavaScript - Coding Style (1)
26. JavaScript - Coding Style (2)
27. JavaScript - 非同步執行
28. JavaScript - Promise (1)
29. JavaScript - Promise (2)
30. I Want To Know JS - 結語
後面有兩篇關於「屬性描述器(Property Descriptor)」補充:
1. JavaScript - 屬性描述器 (1)
2. JavaScript - 屬性描述器 (2)
相信整個系列讀下來,應該對各位 JavaScript 的功力進步很有幫助才是!
希望大家喜歡今天的分享!請大家多多按讚鼓勵、或追蹤我的 FB、YouTube、以及 Instagram 喔~
---------------
Facebook 粉絲頁(歡迎追蹤): https://goo.gl/N1z9JB
YouTube 頻道(歡迎訂閱): https://goo.gl/pQsdCt
Instagram 日常生活: https://goo.gl/nBHzXC
「js call function」的推薦目錄:
- 關於js call function 在 紀老師程式教學網 Facebook 的精選貼文
- 關於js call function 在 紀老師程式教學網 Facebook 的精選貼文
- 關於js call function 在 Taipei Ethereum Meetup Facebook 的精選貼文
- 關於js call function 在 JavaScript call() Method and Its Practical Applications 的評價
- 關於js call function 在 How to execute a JavaScript function when I have its name as ... 的評價
- 關於js call function 在 The 'call' Method in JavaScript | Function Call Explained 的評價
- 關於js call function 在 How to call function from another function using magento ... 的評價
- 關於js call function 在 Log every function call to the console - gists · GitHub 的評價
js call function 在 紀老師程式教學網 Facebook 的精選貼文
[好文推薦] 30 天學會 JavaScript!免費!全中文喔!
文章連結:https://goo.gl/UN7EBZ
-\-\-\-\-\-\-\-\(本文開始)-\-\-\-\-\-\-\-\
今天推薦的是由「IT 邦幫忙」網站的一個系列文:「I Want to Know JS」。它用 30 + 2 篇幅,很完整地介紹了 JavaScript。如果想學 JavaScript 的朋友,不妨閱讀看看!
前面的 30 篇,分別是介紹 JavaScript 的正文。分別是:
01. Why Do I Want To Know JS
02. JavaScript - 原始型別概述
03. JavaScript - Built-In Objects 概述
04. JavaScript - 原始型別個別介紹
05. JavaScript - 物件 與 屬性
06. JavaScript - 變數
07. JavaScript - 參數傳遞方式 (1)
08. JavaScript - 參數傳遞方式 (2)
09. JavaScript - Function
10. JavaScript - Lexical Scope
11. JavaScript - Scope 單位 & 查找
12. JavaScript - Hoisting
13. JavaScript - Closure (1)
14. JavaScript - Closure (2)
15. JavaScript - Scope 實作建議
16. JavaScript - call,apply,bind
17. JavaScript - This (1)
18. JavaScript - This (2)
19. JavaScript - This Priority
20. JavaScript - 物件導向 (1)
21. JavaScript - 物件導向 (2) - 建立共用函式
22. JavaScript 物件導向 (3) - 繼承原型方法
23. JavaScript 物件導向 (4) - With ES6
24. JavaScript - Prototype Chain
25. JavaScript - Coding Style (1)
26. JavaScript - Coding Style (2)
27. JavaScript - 非同步執行
28. JavaScript - Promise (1)
29. JavaScript - Promise (2)
30. I Want To Know JS - 結語
後面有兩篇關於「屬性描述器(Property Descriptor)」補充:
1. JavaScript - 屬性描述器 (1)
2. JavaScript - 屬性描述器 (2)
相信整個系列讀下來,應該對各位 JavaScript 的功力進步很有幫助才是!
希望大家喜歡今天的分享!請大家多多按讚鼓勵、或追蹤我的 FB、YouTube、以及 Instagram 喔~
-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
Facebook 粉絲頁(歡迎追蹤): https://goo.gl/N1z9JB
YouTube 頻道(歡迎訂閱): https://goo.gl/pQsdCt
Instagram 日常生活: https://goo.gl/nBHzXC
js call function 在 Taipei Ethereum Meetup Facebook 的精選貼文
📜 [專欄新文章] Solidity Weekly #11
✍️ mingderwang
📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium
pure 跟 view 怎麼用?
在 Solidity 0.4.16 (含)之前,modifier constant 表示該 function 不會動到合約的 state (狀態), 例如:
string greeting;
function SayHello() public constant returns(string says) { return greeting;}
greeting 在 constructor 或其他地方, 已經有值,在這 SayHello() function 裡並沒有更動到 greeting 的值 (也就是合約的狀態)。
更正確的講,如果一個 function 不會改變到合約的 state,就可以加 modifier constant 在 returns 前面,因此在 web3.js 就可以用 call() 來呼叫該 function, 而不需要用 sendTransaction() 來呼叫。
到了 solc 0.4.17, 更把 constant 細分為 view 或 pure 兩種,只是程度上的不同。
view 一般來說,就用來取代 constant, 跟 compiler 説,該 function 不會對 storage state 有任何變動。(但會進行讀取, 所以 constant 改名為 view,更為恰當)
string greeting;
function SayHello() public view returns(string says) { return greeting;}
pure 定義該 function 連讀 storage state 都沒有。有人舉了一個誇張的例子如下:(它跟合約的所有 states 都無關, 可以加 modifier pure)
function returnTrue() public pure returns(bool response) { return true;}
links 分享;
Plasma Cash Simple Spec — (Karl Floersch)
Plasma Cash Initial Release — Plasma-Backed NFTs Now Available on Loom Network Sidechains — (Matthew Campbell)
https://github.com/loomnetwork/plasma-cash
https://github.com/omisego/plasma-cash
後記;
那麼有用 view 或 pure 有什麼好處?當然有了,以後 solc 最佳化, 可以因沒有 transaction, 而不需花 gas。現在這類的 function 也不必花時間到 network 去做確認造成 delay,也可以靠 compiler 檢查,避免 state 被意外修改。所以該加 view 或 pure 就要加。
*view 和 pure 取代 constant 開始於 solidity ^0.4.17
Solidity Weekly #11 was originally published in Taipei Ethereum Meetup on Medium, where people are continuing the conversation by highlighting and responding to this story.
👏 歡迎轉載分享鼓掌
js call function 在 How to execute a JavaScript function when I have its name as ... 的推薦與評價
... <看更多>
相關內容
js call function 在 The 'call' Method in JavaScript | Function Call Explained 的推薦與評價
The 'call' method in JavaScript (Function.prototype.call) allows you to call a function or method like ... ... <看更多>
js call function 在 JavaScript call() Method and Its Practical Applications 的推薦與評價
Introduction to the JavaScript call() method ... The call() method calls a function functionName with a given this value and arguments. The first argument of the ... ... <看更多>