在五樓寫程式
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
<font color="#8A2BE2">[Udemy JS Jonas]</font> Ch2 基礎JS part1 === # Ch1 ## 大綱 :::success 共20 section 60hr | | | | | -------- | -------- | -------- | | ![](https://i.imgur.com/BuuUmqA.png)| ![](https://i.imgur.com/UFIvenP.png) | ::: | 課號 | 課程內容 | 照片示意 |學習內容| | - | - | - |-| |01| | || |02|基礎JS||| |03|基礎JS||| |05|開發環境||| |07|DOM|![](https://i.imgur.com/GUXPW0z.png)|| |08|JS是怎麼形成的|![](https://i.imgur.com/M9xPv00.png)|callback函示| |09|ES6||map desrcutruee string clousre| |10|函示||map desrcutruee string clousre| |11|開發環境|![](https://i.imgur.com/9mrBpgD.png)|array numbers date timer| |12|開發環境|![](https://i.imgur.com/q9wM0kD.png)|array numbers date timer| |13|進階DOM|![](https://i.imgur.com/eaJ8X23.png)|自組網站(照片滑塊)| |14|OOP JS||| |15|地圖專案|![](https://i.imgur.com/DRoozgo.png)|規劃項目| |16|非同步JS|![](https://i.imgur.com/0YtUYn2.png)|AJAX| |17|現代JS應用|![](https://i.imgur.com/0mK8sx0.png)|NPM、Babel、Parcel、ES6| |18|Fork 專案|![](https://i.imgur.com/Hc40A58.png)|NPM、Babel、Parcel、ES6| |19|最後專案|![](https://i.imgur.com/Xv1e2L1.png)|Netlify、Git| # Ch2基礎JS Part1 ## 8. Brief JS ### JS應用 前、後、App、桌面應用程式 ![](https://i.imgur.com/kCiojhX.png) :::success | | | | | -------- | -------- | -------- | | Ionic| 是基於HTML5、CSS、JavaScript的Web Mobile App開發框架 |![](https://i.imgur.com/W08o6JD.png) | | Electron| 是一個將 JavaScript、HTML與SS等網頁技術轉換為桌面應用程式的框架,轉換後可於 Mac、Windows 以及 Linux 上運行,像是 VSCode、Slack 電腦版等等都是用它寫的 | ![](https://i.imgur.com/cMYN0TF.png) | ::: ### 關於ES5...與後面的發展 ES = ECMAScript ![](https://i.imgur.com/gBNXnBr.png) ## 9. Linking a JS檔案 ### 寫在VS code上 ```javascript= <script> let js = 'amazing'; if (js === 'amazing') alert('JavaScript is FUN!'); </script> ``` ![](https://i.imgur.com/pAjJEnH.png) ### HTML JS分離 HTML body 插入 script 連結 JS檔案 ![](https://i.imgur.com/jlVhn5m.png) ![](https://i.imgur.com/Tpmce2K.jpg) ### 單元練習 國家/哪一州/人口 ![](https://i.imgur.com/KPEDuFx.png) ![](https://i.imgur.com/twwyAEV.png) ## 12. Data Type ### JS的值 每個JS值可區分為兩種 『物件』 『原始型別(Numbe、String、Boolean、Undefined、Null、Symbol、BigInt)』 ![](https://i.imgur.com/SUsIfzM.png) :::danger let x = 3 value 有 type 3 有type (不是 x 有 type) ::: :::info ![](https://i.imgur.com/RvChAqj.png) null的 type 竟然是 object !! 這是JS的bug ::: ### 單元練習 ![](https://i.imgur.com/1chS8aC.png) ![](https://i.imgur.com/icwVqGE.png) ## 13. let, const, var ```javascript= let x=5 x=6 ``` ```javascript= const y=5 y=6 //會報錯,因為const是不可變的變量 const y //會報錯,因為const需要初始值 ``` ```javascript= var job = 'programeer' job = 'teacher' //是可以的,在ch7會說明差異 //let是block scope區塊作用域 //var是function scope函式作用域 ``` ## 14. Basic Operator ```javascript= //用逗點 分別印出很多值 const dog = 3 const cat = 2 console.log(dog, cat) //3,2 //次方**寫法 const money = 2 money ** 3 = 8 //2^3 //先加減再比較 const age = 30 console.log(age-2023 > age-2022) //先執行左右兩邊 age-2023 與 age-2022 再進行比較 ``` ## 15. Operator Precedence 運算符號優先級別 ```javascript= //assigment 賦值運算子是右到左 let x,y //x y目前都是undefined x = y = 25 - 10 - 5 //實際運作是 程式碼先檢視這行看到 //『賦值運算子(右到左)優先權低』『減法運算子(左到右)優先權高』 //先執行減法再執行等於 ``` ## 16. 程式挑戰1 ![](https://i.imgur.com/s3PKgB6.png) ```javascript= let marksWeight = 78 let marksHeight = 1.69 let marksBMI1 = (marksWeight) / (marksHeight ** 2) let johnWeight = 92 let johnHeight = 1.95 let johnBMI1 = (johnWeight) / (johnHeight **2) const markHigherBMI1 = marksBMI1>johnBMI1 console.log(marksBMI1, johnBMI1, markHigherBMI1) marksWeight = 95 //Data2 marksHeight = 1.88 //Data2 let marksBMI2 = (marksWeight) / (marksHeight ** 2) johnWeight = 85 //Data2 johnHeight = 1.76 //Data2 let johnBMI2 = (johnWeight) / (johnHeight **2) const markHigherBMI2 = marksBMI2>johnBMI2 console.log(johnBMI2, marksBMI2, markHigherBMI2) ``` 連結:https://replit.com/@bobyin22/coding-challenge-1#index.js ## 17. Strings and Template Literals ### ES6 template literal template literal模板文字 ![](https://i.imgur.com/i7lmCWE.png) ```javascript= //古早用法 console.log('String with\n\ multiple\n\ lines\n\ ') //ES6 template literal模板文字用法 console.log(`String with multiple lines `) //ES6 template literal 加上{JS算數} 模板文字用法 const job = 'teacher' const yearSalary = 50000*12 console.log(`I am a ${job}, I earn ${yearSalary} a year`) ``` ## 18. Taking Decisions: if / else Statements ![](https://i.imgur.com/XKk0iZZ.png) ```javascript= 只有if沒有else也是合法的 const age = 19 const isOldEnough = age >= 18 //這是會是 true //因為isOldEnough是true,所以會執行 if(isOldEnough) { console.log('小明夠老了,可以開車 🤣 ') } ``` ## 19. 程式挑戰2 ![](https://i.imgur.com/ZqkAQhT.png) ```javascript= let marksWeight = 78 let marksHeight = 1.69 let marksBMI1 = (marksWeight) / (marksHeight ** 2) let johnWeight = 92 let johnHeight = 1.95 let johnBMI1 = (johnWeight) / (johnHeight **2) const markHigherBMI1 = marksBMI1>johnBMI1 console.log(marksBMI1, johnBMI1, markHigherBMI1) if(marksBMI1>johnBMI1){ console.log(`Mark's BMI ${marksBMI1} is higher than John's ${johnBMI1}!`) }else{ console.log(`John's BMI ${johnBMI1} is higher than Mark's ${marksBMI1}!`) } marksWeight = 95 //Data2 marksHeight = 1.88 //Data2 let marksBMI2 = (marksWeight) / (marksHeight ** 2) johnWeight = 85 //Data2 johnHeight = 1.76 //Data2 let johnBMI2 = (johnWeight) / (johnHeight **2) const markHigherBMI2 = marksBMI2>johnBMI2 console.log(johnBMI2, marksBMI2, markHigherBMI2) if(marksBMI2>johnBMI2){ console.log(`Mark's BMI ${markHigherBMI2} is higher than John's ${johnBMI2}!`) }else{ console.log(`John's BMI ${johnBMI2} is higher than Mark's ${markHigherBMI2}!`) } ``` ## 20. Type Conversion(類型轉換) and Coercion(類型強制) ### String to Number NaN = not a number = 無效的數字(不是 不是數字 字面上的意思) ```javascript= //Type Conversion(類型轉換) const inputYear = '1991' console.log(Number(inputYear), inputYear) //1991 "1991" console.log('Bob') console.log(typeof NaN) //number console.log() ``` ```javascript= //Type Coercion(類型強制) //##########關於+ //範例1 console.log('I am ' + 23 + ' years old') //I am 23 years old //範例1 let n = '1' + 1 //'11' n = n -1 console.log(n) //10 //範例3 console.log(2+3+4+'5') //95 //##########關於- console.log('23' - '10' -3) //10 //步驟1 '23' - '10' =13 //步驟2 13 - 3 =10 //##########關於* 關於/ console.log('23' / '2') //11.5 console.log('23' * '2') //46 //綜合應用 2+3+4+'5' //"95" '10'-'4'-'3'-'2'+'5' //"15" ``` ![](https://i.imgur.com/gHfsqaR.png) ### 單元練習 ```javascript= //題目1 '9'-'5' //4 (typeof Number) //題目2 '19'-'13'+'17' //'617' (typeof String) //'19'-'13'=6 //6 + '17' = '617' //題目3 '19'-'13'+17 //23 (typeof Number) //'19'-'13'=6 //6+17=23 //題目4 /* 這題被刪除了,因為字串比大小是用Unicode去比 '123' < 57 //false */ //題目5 5+6+'4'+9-4-2 //1143 //5+6=11 //11+'4'='114' //'114'+9 = '1149' //'1149'-4 = 1145 //'1145'-2 = 1143 ``` ## 21.Truthy and Falsy Values ### Boolean 布林值的5個falsy value (0, '', undefined, null, NaN),其他都是true ```javascript= //範例1 console.log(Boolean(0)) //false console.log(Boolean(undefined)) //false console.log(Boolean('Bob')) //true console.log(Boolean({})) //true console.log(Boolean('')) //false //範例2 const money = 0 //因為0是false 印出else的東西 if(money) { console.log("Don't spend it all") } else{ console.log('You should get a job!') //印出這個 } //範例3 let height //因為目前尚未賦值,所以height是undefined,undefined在布林值來說是false if(height) { console.log('YAY! Height is defined') } else { console.log('Height is UNDEFINED') //印出這個 } 補充:但是 money = 0是有可能的,所以之後的if statment 會用 === == 來寫,會更合適 ``` ## 22.Equality Operators: == vs. === ```javascript= 嚴格模式 const age = 18 if(age === 18) console.log('你成年了 :) (strict)')//符合,會印 if(age == 18) console.log('你成年了 :) (loose)') //符合,會印 鬆散模式 const age = '18' if(age === 18) console.log('你成年了 :) (strict)') if(age == 18) console.log('你成年了 :) (loose)') //符合,會印 ``` 舉例 const favorite = prompt('請輸入你想要的數字') ![](https://i.imgur.com/W4M3Six.png) ![](https://i.imgur.com/bpocOQH.png) ```javascript= const favorite = prompt('請輸入你想要的數字') //輸入'10' console.log(favorite) //'10' console.log(typeof favorite) //字串 if(favorite === 23){ console.log('輸入到23了') } else if(favorite === 19){ console.log('輸入到19了') } else if(favorite === 9){ console.log('輸入到9了') } else { console.log('以上都沒有符合')//符合,印出這行 } if (favorite !== 23) console.log('都不符合23呀') //符合,印出這行 ``` ### 單元練習 ```javascript= 嚴格模式,輸入是字串,即使輸入'1' '2' '0'都不符合,會跳到else const numNeighbors = prompt('How many neighbor countries does your country have?') 但是加上Number改變型態,就可以了 const numNeighbors = Number(prompt('How many neighbor countries does your country have?')) console.log(typeof numNeighbors) if (numNeighbors === 1) { console.log('Only 1 border!') } else if (numNeighbors === 2) { console.log('2 border!') } else if (numNeighbors === 0) { console.log('0 border!') } else { console.log('Your input is not in my expectation!') } ``` ## 23. Boolean Logic (AND/OR/NOT) NOT(!)運算子比 AND OR都還有效率 ![](https://i.imgur.com/6tJH5Kn.png) ## 24. Logical Operators ```javascript= const driveLicense = true const seeClear = true console.log(driveLicense && seeClear) //true console.log(driveLicense || seeClear) //true console.log(!driveLicense) //false const tire = false console.log(driveLicense && seeClear && tire) //false //思考步驟1 &&由右到左 //思考步驟2 seeClear && tire 就是true && false 出來是 false //思考步驟3 driveLicense && false 出來是false if (driveLicense && seeClear && !tire) { console.log('可以開車') //符合,會印出 } else{ console.log('不行,建議不要讓這個人開車') } ``` :::danger 下圖:&&由右到左 步驟1 true | | false 是true 步驟2 true | | true 是true ::: ![](https://i.imgur.com/I1QUC3p.png) ![](https://i.imgur.com/WrIUD33.png) ### 單元練習 ```javascript= let country = 'Taiwan' let language = 'Chinese' let population = 23000000 const isSpeakingEnglish = false const isPopulationLess50Million = true if ((language === 'English') && (population < 50000000)) { console.log(`My country ${country} meet Sarah's living expectation") } else { console.log(`My country ${country} not suitable for Sarah`) } ``` ![](https://i.imgur.com/KRgs0dD.png) ## 25. Coding 挑戰 #3 題目 ![](https://i.imgur.com/7NSqsl2.png) 第一題 ```javascript= //2對比三次,平均最高的贏家獲得獎盃 const dolphinesAverageScroe = (96 + 108 + 89)/3 //97... const koalasAverageScore = (88 + 91 + 110)/3 //96... if(dolphinesAverageScroe > koalasAverageScore) { console.log("dolphines win") } else if(dolphinesAverageScroe < koalasAverageScore) { console.log("koalas win") } else if(dolphinesAverageScroe === koalasAverageScore) { console.log("平手") } ``` 第二題 ![](https://i.imgur.com/MdaAEWh.png) ```javascript= 思考錯誤,以為是比單一分數100以上去做總和比較 const dolphinesScore = [97, 112, 101] sum1 = 0 for(let i=0; i<dolphinesScore.length ; i++) { if(dolphinesScore[i]>=100) { sum1 += dolphinesScore[i] } } const avgDolphines = sum1 /3 console.log('avgDolphines', avgDolphines) const koalasScore = [109, 95, 123] sum2 = 0 for(let i=0; i<koalasScore.length ; i++) { if(koalasScore[i]>=100) { sum2 += koalasScore[i] } } const avgKoalas = sum2 /3 console.log('avgKoalas', avgKoalas) if(avgDolphines > avgKoalas){ console.log('avgDolphines win') } else { console.log('avgKoalas win') } ``` ```javascript= 修正 const dolphinesAverageScroe = (97 + 112 + 101)/3 //97... const koalasAverageScore = (109 + 95 + 123)/3 //96... if(dolphinesAverageScroe > koalasAverageScore && dolphinesAverageScroe >= 100) { console.log("dolphines win") } else if(dolphinesAverageScroe < koalasAverageScore && koalasAverageScore >= 100) { console.log("koalas win") } else if(dolphinesAverageScroe === koalasAverageScore && dolphinesAverageScroe >=100 ) { console.log("平手") } else { console.log("沒人贏") } ``` 第三題 ![](https://i.imgur.com/bc91GvX.png) ```javascript= const q3dolphinesScore = [97, 112, 101] let count1 = 0 let total1 = 0 for(let i=0; i<q3dolphinesScore.length ;i++) { if(q3dolphinesScore[i]>=100) count1+=1 total1 += q3dolphinesScore[i] } console.log(count1) console.log(total1) const q3koalasScore = [109, 95, 110] let count2 = 0 let total2 = 0 for(let i=0; i<q3koalasScore.length ;i++) { if(q3koalasScore[i]>=100) count2+=1 total2 += q3koalasScore[i] } console.log(count2) console.log(total2) if(total1===total2 && count1===count2) { console.log('平局') } else { console.log('沒有人贏得獎盃') } ``` ## 26. The Switch Statement ```javascript= const day = 'monday' switch (day) { case 'monday': console.log('規劃這週的工作') //符合,會印 console.log('週一有開發會議') //符合,會印 case 'tuesday': console.log('週二要準備影片') //符合,會印(因為週一沒有寫break) break; case 'wednesday': case 'thursday': console.log('週四準備範例') break; case 'friday': console.log('週五錄影片') break; case 'saturday': case 'sunday': console.log('休假休息') break; default: console.log('以上皆不符合') } ``` ```javascript= const day = 'monday' if(day === 'monday') { console.log('規劃這週的工作') console.log('週一有開發會議') } else if(day === 'tuesday') { console.log('週二要準備影片') } else if(day === 'wednesday' || day === 'thursday') { console.log('週四準備範例') } else if (day === 'friday') { console.log('週五錄影片') } else if (day === 'saturday' || day === 'sunday') { console.log('休假休息') } else { console.log('以上皆不符合') } ``` ### 單元練習 ```javascript= //##### The Switch Statement switch (language) { case 'chinese': case 'mandarin': console.log('母語使用者數量最多!') break; case 'spanish': console.log('母語使用者數量排名第二') break; case 'english': console.log('第三名') break; case 'hindi': console.log('第四名') break; case 'arabic': console.log('第五大使用語言') break; default: console.log('也是一種很棒的語言:D') } ``` ## 27. Statement And Expression ### Statement Statement 比較像是程式執行的動作 ```javascript= if(23>10) { //並沒有產生值 const str = '23 is biggger'; //大部分用;結尾都是Statement,就像是一個句子 } ``` ### Expression Expression 比較像是值 ```javascript= 3+4 1991 true && false && !false //模板文字 ${放入Expression} const name = Jack console.log(`I am ${name}`) ``` ## 28. The Conditional (Ternary) Operator 三元運算子 :::danger 三元運算子是expression,所以可以寫在文字模板(template literal ${} ) 然而三元運算子並不是為了取代if else的,當程式碼多的時候if else作用就會很好用 ::: ```javascript= 三元運算子基本操作 const age = 15 age >= 18 ? console.log('我喜歡喝紅酒🍷'): //if console.log('我喜歡喝水💧') //else 符合,會印出 const age = 23 age >= 18 ? console.log('我喜歡喝紅酒🍷'): //if 符合,會印出 console.log('我喜歡喝水💧') //else ``` ```javascript= 三元運算子比較常見的寫法 const age = 15 const hobby = age >=18 ? '喝紅酒🍷' : '喝水💧'; console.log(hobby) //會印出 else陳述句 喝水💧 ``` ```javascript= 原本if else寫法 const age = 15 if(age>=18){ const hobby = '喝紅酒🍷' } else { const hobby = '喝水💧' } console.log(hobby) ``` ```javascript= 超級重要,三元運算子是expression,所以可以寫在文字模板(template literal ${} ) console.log(`我喜歡喝 ${age >=18 ? '喝紅酒🍷' : '喝水💧'}`) ``` ### 單元練習 ![](https://i.imgur.com/chRC3Ok.png) ```javascript= const population = 23000000 const word = population >= 33000000 ? "Taiwan's population is above average" : "Taiwan's population is below average"; console.log(word) //會印出else陳述句 Taiwan's population is below average ``` ## 29. 程式挑戰 #4 ![](https://i.imgur.com/jhP1urr.png) ```javascript= //消費50~300 小費15% //消費其他 小費20% const data = 275 const tips = (data >= 50) && (data <= 300) ? data*0.15 : data*0.2 console.log(`The bill was ${data}, the tip was ${tips}, and the total value ${data+tips}`) ``` ## 30. JavaScript Releases: ES5, ES6+ and ESNext ![](https://i.imgur.com/qg91Ibp.jpg) ![](https://i.imgur.com/MV0M9Cj.png) | ES5 1 | ES6 | modern JS | | -------- | -------- | -------- | | var | const/let | | ||function constrction|| ||ES6 class|| ###### tags: `[Udemy JS Jonas]`

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully