我試圖解釋VS文檔類代碼編寫時間軸代碼之間的差異,所以到目前爲止,我有:VS文檔類代碼
Timeline code:
- doesn't require a package and class declaration
Document Class code:
- requires a package and class declaration
Timeline code:
- starts working on the top-most line
Document Class Code:
- starts working from the constructor function
Timeline code:
- loops, conditionals and event listeners can be **outside** of a function
Document Class Code:
- loops, conditionals and event listeners must be **inside** a function
這些是正確的,是有沒有什麼東西會絆倒正在進行轉型的人嗎?
謝謝,這太棒了。我想教一個只知道時間線代碼的人在Document類中編寫代碼,但這已經很長時間了,所以我已經忘記了這些差異...... – redconservatory 2011-02-06 18:34:13