Basic Concept JavaScript Types are Dynamic This means that the same variable can be used to hold different data types var x; (undefined) x = 5; (Number) x = "abc" (String); <script></script>Placing scripts at the bottom of the element improves the display speed, because script interpretation slows down the display. Using document.write() after an HTML document is loaded, will delete all existing HTML. (should only be used for testing) window keyword is optional (wondow.alert() => alert()) print() : literally call a printer to print avoid code lines longer than 80 characters.
10/9/2022取代換行 ctrl+H search mode 'Extended' Replace with \r\n 取代字首 ctrl+H search mode 'Regular expression' Find what ^ replace with
10/9/2022Robert Cecil Martin所統整的物件導向設計原則。 S : 單一功能原則(Single Responsibility Principle) One class should have one and only one responsibility. 物件應該僅具有一種單一功能,based on cohesion。 功能(職責)定義為:「改變的原因」。 一個類或者模組應該只有一個職責。 比如有一個用於編輯和列印報表的class。這樣的一個class存在兩個職責。 第一,報表的內容可以改變(編輯)。第二,報表的格式可以改變(列印)。
10/9/2022or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up