JavaScript in 24 Hours, 7th Edition cover

JavaScript in 24 Hours, 7th Edition

Rating 4.0
Chapters
31
Series
Sams Teach Yourself Series (Chinese translation)
ISBN
9787115509383

Tags

Summary

This book is the Chinese translation of the 7th edition of Sams Teach Yourself JavaScript in 24 Hours. Written for complete beginners, it lays out a complete learning path through JavaScript, from basic syntax to hands-on practice, across 24 chapters in six parts. Part 1, "JavaScript Basics," begins with the difference between server-side and client-side programming and the origins of JavaScript, then guides readers to write their first script, use functions, and get an initial look at DOM objects and built-in objects. Part 2 moves into the everyday programming essentials: numbers, strings, arrays, events, and program control. Part 3 covers object-oriented programming, advanced objects, DOM scripting, and JSON, helping readers understand JavaScript's object model. Part 4 focuses on the web interface, covering how JavaScript works with HTML and CSS and the basics of CSS3. Part 5 addresses more advanced topics such as reading and writing cookies, regular expressions, closures, and organizing code with modules. Part 6 offers advice on good programming habits, debugging code, and continuing to learn; an appendix rounds up commonly used JavaScript development tools. The explanations progress from simple to advanced, and the examples are short and immediately usable, ideal for learning a chapter in spare moments. Note that this edition was completed in the early days of ES6 adoption and bases its syntax coverage on the web standards of that time; when practicing newer techniques, consult the latest documentation.

Editor's review

市面上的 JavaScript 书要么厚到能当哑铃,要么直接跳进框架,让初学者一头雾水。本书难得地保持了小体量:正文三百余页,去掉代码清单和图示,真正需要精读的内容不算多,一周内通读一遍是现实可行的目标。它的优点在于“顺着人的思路讲”:先解释浏览器里为什么会有脚本,再让你动手写出第一行代码,然后才逐步引入函数、对象、DOM、事件、Ajax 与闭包。每章结尾配有习题,读者不会被一堆术语推着走,而是能在不断得到反馈的过程中往前走。第七版把 HTML5、CSS3、JSON、模块化、调试与编程习惯等内容都纳入了视野,读完不仅能写脚本,也知道代码该怎么组织、怎么排查问题。当然,它并非 JavaScript 的“终极答案”:ES6 之后的箭头函数、Promise、async/await 在本书中着墨有限,正则、闭包等章节也只是引路。比较理想的用法是把它当作第一本系统读物,读完再上《JavaScript高级程序设计》或 MDN 文档补现代语法。对想用最短时间建立完整轮廓的初学者,这本书的性价比很高。

Who it's for

A good fit for

  • 完全没有编程经验、想系统入门 Web 前端的读者
  • 会 HTML 和 CSS、但 JavaScript 一直没学明白的网页制作者
  • 需要一本教材带班或自学的高校计算机专业低年级学生
  • 想快速补齐脚本基础、方便后续上手框架的后端开发者

Not a good fit for

  • 已熟悉 ES6 语法、想深入 Promise、异步与工程化实践的中高级前端
  • 希望直接学习 React、Vue 等框架实战的读者
  • 需要查阅完整 ECMAScript 规范或 API 字典的开发者

Reading tips

  1. 按章节顺序阅读并亲手敲完示例代码,不要只读不写,每章习题至少完成一半。
  2. 把每章代码保存成独立文件并在浏览器控制台中运行,养成用调试器查看变量与断点的习惯。
  3. 读到闭包、正则、模块等章节时配合 MDN 文档交叉阅读,补齐书中未覆盖的现代语法。
  4. 全书读完后用一个留言板或待办清单小项目串联知识点,再转入《JavaScript高级程序设计》进阶。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Part 1: JavaScript Basics
  2. Chapter 1: Introduction to JavaScript
  3. Chapter 2: Creating Simple Scripts
  4. Chapter 3: Using Functions
  5. Chapter 4: More About Functions
  6. Chapter 5: DOM Objects and Built-in Objects
  7. Part 2: JavaScript Programming
  8. Chapter 6: Numbers and Strings
  9. Chapter 7: Working with Strings
  10. Chapter 8: Arrays
  11. Chapter 9: Handling Events with JavaScript
  12. Chapter 10: Program Control
  13. Part 3: Understanding JavaScript Objects
  14. Chapter 11: Object-Oriented Programming
  15. Chapter 12: Advanced Objects
  16. Chapter 13: DOM Scripting
  17. Chapter 14: Introduction to JSON
  18. Part 4: Working with the Web Interface Using JavaScript
  19. Chapter 15: HTML and JavaScript Programming
  20. Chapter 16: JavaScript and CSS
  21. Chapter 17: Introduction to CSS3
  22. Part 5: Advanced Techniques with JavaScript Tools
  23. Chapter 18: Reading and Writing Cookies
  24. Chapter 19: Matching Patterns with Regular Expressions
  25. Chapter 20: Understanding and Using Closures
  26. Chapter 21: Organizing Code with Modules
  27. Part 6: Professional Skills
  28. Chapter 22: Good Programming Habits
  29. Chapter 23: Debugging Code
  30. Chapter 24: Continuing to Learn
  31. Appendix: JavaScript Development Tools

FAQ

这本书适合零基础直接读吗?
适合。全书从浏览器如何执行脚本讲起,不默认读者有编程经验,示例短小、配有输出和讲解。但如果连 HTML 标签都不认识,建议先花一两天补 HTML 与 CSS 基础,否则 DOM 相关章节会吃力。
这本书和《JavaScript高级程序设计》有什么区别?
本书体量小、节奏快,目标是让初学者在一周左右建立完整轮廓;《JavaScript高级程序设计》篇幅更长、细节更全,对语言机制和现代语法讲得更深。常见做法是先读本书,再用后者系统深化。
第7版覆盖 ES6 及之后的新语法吗?
第七版成书于 2019 年前后,对 HTML5、CSS3、JSON、模块化有所涉及,但箭头函数、Promise、async/await 等现代特性讲解有限。学完本书后建议结合 MDN 官方文档补充这部分内容。
译文质量怎么样,代码能跑通吗?
由李强翻译,属 Sams Teach Yourself 系列中译本,整体术语沿用国内常见译法,可读性尚可。书中示例多为原生 JavaScript 片段,但涉及浏览器差异的部分需要按当前浏览器环境自行调整,个别库版本也可能已过时。
读完这本之后该读什么?
可以先读《JavaScript高级程序设计(第4版)》打牢语言基础,再读《你不知道的 JavaScript》理解作用域与异步;练习方向建议做几个小项目,熟悉 DOM 操作后再接触 ES6 与前端框架。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category