JS-1: JavaScript Fundamentals
JavaScript Fundamentals
Section titled “JavaScript Fundamentals”JavaScript เป็นภาษาที่ทำงานได้ทั้งฝั่ง browser และ server (Node.js) — เป็นภาษาแรกที่ควรเรียนถ้าต้องการทำ web development
เป้าหมายการเรียนรู้
Section titled “เป้าหมายการเรียนรู้”- ประกาศตัวแปรด้วย let, const และเข้าใจความแตกต่างจาก var
- แยกแยะ primitive types ทั้ง 7 ชนิดและใช้ typeof ตรวจสอบได้
- ใช้ operators ต่าง ๆ รวมถึง === และ ?? ได้ถูกต้อง
- เขียน control flow ด้วย if/else, loops และ switch ได้
Progress 0 / 4
โครงสร้างบท
Section titled “โครงสร้างบท” 01 — Variables & Types let/const/var, primitive types, typeof, template literals
02 — Operators arithmetic, comparison, logical, ternary, nullish coalescing
03 — Control Flow if/else, switch, for/while, for...of, break/continue
Lab: Type Playground สำรวจ typeof กับค่าต่าง ๆ แบบ hands-on
ทำไมต้องเริ่มจาก Fundamentals?
Section titled “ทำไมต้องเริ่มจาก Fundamentals?”การเข้าใจพื้นฐานอย่างแท้จริงจะช่วยให้:
- Debug ได้เร็ว — เข้าใจว่า type coercion ทำงานอย่างไร
- เขียน code สะอาด — เลือกใช้
constvsletอย่างเหมาะสม - ต่อยอดได้ง่าย — framework อย่าง React, Vue ล้วนสร้างบน fundamentals เหล่านี้