在 pseudo-classical pattern 中,物件是由「建構子」(constructor)這個函式所建立,並把 method 放到建構子的 prototype 中。
Native JavaScript 物件將 method 存在 prototype 中。例如:當一個新的物件被建立,內容為空,但為何可以使用 toString 這個 method?
又重新看了 jQuery: Novice to Ninja,所以做了些關於 Plugin 的筆記。以下使用 jQuery Newsticker Plugin 作為說明範例。