kipalog.com kipalog.com

20+ Javascript: Những điều bạn có thể chưa biết

Toán tử 3 ngôi Longhand const x = 20; let big; if (x > 10) { big = true; } else { big = false; } Shorthand const big = x > 10 ? true : false; Lồng nhau const big = x > 10 ? " greater 10" : x < 5 ? "less 5" : "between 5 and 10"; Gán giá trị Longhand if (variable1 !== null || variable1 !== undefined || variable1 !== '') { let variable2 = variable1; } Shorthand const variable2 = variable1...

kipalog.com kipalog.com

[TIL][Daily Log] Notes: basic Terminal and Git

Terminal show all folders/files ls Up folder cd .. Remove rm rm - m Open file open file_name open . open file_name -a 'editor_name' Rename and Move to another direction mv file_name file_name Git git clone url git status git add ./(-A)/file_name git commit - m 'message' git push / git push origin branch Branch git branch git branch branch_name git checkout branch_name Delete git push origin -delete...