今天練習的是Javascript裡非常重要的概念-“Closure(封裝)”
也就是和C#、JAVA等語言一樣,變數也能有Private、Public的差別!
Javascript Hoist
W3School Hoist解說參考
為什麼在JavaScript中我們能在檔案最前面叫用後來宣告的方法,就是因為JavaScript中”Hoist”這個行為所產生的結果!
Javascript 中參數 this 的意義、呼叫function的三種方法
this 代表”擁有”這個 function 的 object
如果從全域(什麼都沒有包)直接呼叫,那麼this就是window object,如下所示:1
2
3
4
5function myFunction() {
return this;
}
myFunction();
// Will return the window object
Sublime Text 3 安裝常見問題(Package Control手動安裝、No packages available for installation、安裝Emmet出現錯誤)
Sublime Text 3 是開發前端極好用的IDE,保哥這篇中介紹的很詳細,但安裝時由於Proxy的關係會遇到一些問題,在此分享問題解決方式。
利用 SQL Compact Edition 免費建立擁有 DataBase 的 Azure Websites
在只有免費服務才使用的這個時代,如果只是一個小型網站自然不想月花150使用Azure SQL Server,但自己也沒有Server怎麼辦呢?
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick Start
Create a new post
1 | $ hexo new "My New Post" |
More info: Writing
Run server
1 | $ hexo server |
More info: Server
Generate static files
1 | $ hexo generate |
More info: Generating
Deploy to remote sites
1 | $ hexo deploy |
More info: Deployment