Eloquent JavaScript: การแนะนำเชิงสมัยใหม่สำหรับการเขียนโปรแกรม
คู่มือที่ครอบคลุมเกี่ยวกับการเขียนโปรแกรมสมัยใหม่ด้วยภาษาจาวาสคริปต์ หลักสูตรนี้ครอบคลุมหลักการพื้นฐานของการเขียนโปรแกรม ข้อกำหนดของภาษาจาวาสคริปต์ การรวมกับเบราว์เซอร์เว็บ และการพัฒนาบนเซิร์ฟเวอร์ด้วยน็อด.เจส รวมถึงการประยุกต์ใช้งานจริง 5 โปรเจกต์
ภาพรวมคอร์สเรียน
📚 สรุปเนื้อหา
คู่มือที่ครอบคลุมเกี่ยวกับการเขียนโปรแกรมสมัยใหม่ด้วยภาษาจาวาสคริปต์ หลักสูตรนี้ครอบคลุมหลักการพื้นฐานของการเขียนโปรแกรม ข้อกำหนดของภาษาจาวาสคริปต์ การเชื่อมต่อผ่านเบราว์เซอร์เว็บ และการพัฒนาในระดับเซิร์ฟเวอร์ด้วย Node.js โดยรวมถึงการประยุกต์ใช้งานจริง 5 โครงการ
การดำน้ำลึกอย่างลึกซึ้งและสวยงามไปยังหัวใจของการเขียนโปรแกรมด้วยจาวาสคริปต์
ผู้แต่ง: มารีญ ฮาวเออร์เบเค
คำขอบคุณ: ได้รับการสนับสนุนจากผู้บริจาคทางการเงิน 454 คน; ภาพประกอบโดย วัสิฟ ไฮเดอร์, มักซ์ เซียนตัว, มาร์กาเรียตา มาร์ติเนซ, โฮเซ่ เมโนร์, จิม ไทนีย์, ไดเล่ แม็คเกรกอร์, เจอฟ อาวาโลน, โธมัส พาเลฟ, และ อันโตนิโอ เพอร์โดโม ปาสตอร์
🎯 เป้าหมายการเรียนรู้
- นิยามว่า "โปรแกรม" คืออะไร และอธิบายระดับความเป็นนามธรรมที่แตกต่างกันในภาษาคอมพิวเตอร์
- ใช้เลขจำนวนและตัวดำเนินการทางคณิตศาสตร์ในจาวาสคริปต์เพื่อผลิตค่าต่าง ๆ
- ประกาศตัวแปรและอัปเดตค่าตัวแปร พร้อมปฏิบัติตามกฎการตั้งชื่อและข้อจำกัดคำสงวน
- ใช้โครงสร้างควบคุมที่แข็งแรงโดยใช้
doลูป,forลูป และคำสั่งswitchพร้อมรักษากำกับโค้ดให้สะอาดผ่านการเว้นบรรทัดและการใส่คอมเมนต์ - นิยามและเรียกใช้ฟังก์ชันด้วยหลายรูปแบบ จัดการพารามิเตอร์ อาร์กิวเมนต์ที่ไม่จำเป็น และสภาพแวดล้อมเชิงคำสั่งที่ซ้อนกัน
- ประยุกต์แนวคิดเชิงฟังก์ชันขั้นสูง เช่น การเรียกซ้ำ (recursion), คลอเจอร์ (closure) และเรียกซ้อน (call stack) เพื่อแก้ปัญหาอัลกอริธึมที่ซับซ้อน
- ใช้เมธอดเฉพาะสำหรับวัตถุและอาร์เรย์เพื่อจัดการโครงสร้างข้อมูลที่ซับซ้อนและสตริง
- ใช้ฟังก์ชันระดับสูง (
filter,map,reduce) เพื่อแยกตรรกะและจัดองค์ประกอบการแปลงข้อมูล - นำทางและจัดการห่วงโซ่โปรโตไทป์เพื่อสร้างวัตถุที่มีโครงสร้าง สามารถนำกลับมาใช้ใหม่ได้ และอินเทอร์เฟซแบบพอลิมอร์ฟิก
- สร้างอินเทอร์เฟซแบบพอลิมอร์ฟิกเพื่อจัดการการแสดงผลข้อมูลที่ซับซ้อน (ตาราง)
บทเรียน 共 10 课时 · 预计 30.0h
บทเรียน
Lesson
This lesson introduces the concept of programming as the art of subduing complexity by creating immaterial logic that directs physical hardware. Students will learn the fundamental structure of JavaScript, including the roles of variables, control flow, and the distinction between statements and expressions.
This lesson explores advanced control flow in JavaScript, focusing on sophisticated iteration patterns like for loops, do-while loops, and multi-way branching with switch statements. Students will learn to manage program execution precisely using break and continue keywords, modular arithmetic, and nested loops to solve complex algorithmic challenges.
This lesson explores the concept of abstraction in programming, focusing on how to transition from imperative, hardware-level logic to declarative, human-readable code. Students will learn to implement and refine flexible functions, such as range and sum, while analyzing the performance trade-offs associated with the abstraction tax.
This lesson explores interface-based polymorphism by defining a standardized Table Interface that allows layout engines to process diverse data types through a consistent set of methods. Students will learn to implement flexible, decoupled systems by using defensive programming techniques and interface contracts to manage object rendering and alignment.
This lesson introduces Regular Expressions (RegExp) in JavaScript, covering how to define patterns using literal notation or constructors and how to use the .test() method for validation. Students will learn to manage case sensitivity, handle special characters through escaping, and apply these techniques to dynamic string matching tasks.
This lesson explores the evolution of JavaScript module systems, focusing on how to prevent namespace pollution through techniques like Immediately Invoked Function Expressions (IIFEs) and closures. Students will learn to design robust, encapsulated code by creating private scopes and structured public interfaces for their modules.
AI020: Events and Interactive Platforms (Lesson 7) explores the technical foundations of building dynamic web experiences through DOM manipulation, regular expressions, and event handling. Students will learn to transform static content into interactive environments by implementing efficient workflows for real-time feedback and user input tracking.
This lesson explores the performance advantages of the HTML5 Canvas API over SVG for high-density graphics by utilizing a 2D rendering context to bypass DOM overhead. Students will also examine the role of the transport layer in web applications, specifically analyzing the performance trade-offs between TCP and UDP for data transmission.
This lesson explores the necessity of asynchronous programming in web development to prevent UI freezing caused by synchronous I/O operations. Students will learn to implement event-driven patterns and browser persistence APIs to maintain responsive, high-performance applications during network-intensive tasks.
This lesson explores advanced Canvas API techniques for building interactive drawing tools, focusing on state management, composite operations, and mathematical constraints. Students will learn to implement dynamic features like spray brushes and erasers by manipulating canvas context properties and handling mouse events through higher-order patterns.