feat: Add JavaScript core exercises and solutions

- Implemented exercises for array high-order methods, memory and execution, switch statements, and final review.
- Added starter and answer files for each exercise to facilitate learning.
- Created a runner HTML file to execute JavaScript code and display console outputs.
- Updated README files to include exercise objectives, tasks, and usage instructions.
This commit is contained in:
charlie
2026-03-13 11:09:19 +08:00
parent 4495ae0e28
commit 877acb5a8f
51 changed files with 1949 additions and 5 deletions

View File

@@ -0,0 +1,26 @@
# 练习 14内存和执行
## 目标
理解“值”和“引用”的区别,以及函数执行时数据为什么会变化。
## 你要练什么
- 基本类型复制
- 引用类型共享
- 函数执行顺序
- 参数传递
## 任务
请完成一个“数据变化观察”脚本,要求:
- 比较基本类型复制后是否互相影响
- 比较对象复制后是否互相影响
- 写两个函数观察执行顺序
- 写一个函数修改传入对象,观察外部对象为什么会变化
## 文件
- [starter.js](/Users/lijiaqing/home/wwwroot/front-end-example/03-javascript-core/14-memory-and-execution/starter.js)
- [answer.js](/Users/lijiaqing/home/wwwroot/front-end-example/03-javascript-core/14-memory-and-execution/answer.js)