Chúc mừng bạn đã hoàn thành khóa học! 🎉
const mặc định, let khi cần gán lại, không var.===, ??, ?. thay cho ==, || (khi có 0/""), chuỗi && dài.toSorted, toReversed, with, spread, structuredClone.Object.groupBy/Map.groupBy, Map/Set (kèm Set methods) thay vì tự viết.class với #private, composition hơn kế thừa sâu.async/await + Promise.all/allSettled; giới hạn số tác vụ đồng thời; luôn xử lý lỗi.fetch kiểm tra res.ok; AbortSignal.timeout cho timeout.node: prefix, import JSON với with { type: "json" }.Error thật, có cause; kiểm tra bằng Error.isError khi cần.using cho tài nguyên cần dọn dẹp; Temporal cho ngày giờ (khi môi trường hỗ trợ).textContent thay innerHTML với dữ liệu người dùng; RegExp.escape với input trong RegExp.| Phiên bản | Tính năng bạn sẽ dùng hằng ngày |
|---|---|
| ES2015 | let/const, arrow, class, module, Promise, template literal, destructuring, Map/Set, for...of, generator, Symbol |
| ES2016–2019 | **, includes, async/await, Object.entries/fromEntries, rest/spread object, flat/flatMap, for await |
| ES2020 | ?., ??, BigInt, Promise.allSettled, globalThis, import() |
| ES2021 | replaceAll, Promise.any, ??= ||= &&=, 1_000, WeakRef |
| ES2022 | class field, #private, static block, top-level await, .at(), Object.hasOwn, Error cause |
| ES2023 | toSorted, toReversed, toSpliced, with, findLast |
| ES2024 | Object.groupBy, Map.groupBy, Promise.withResolvers, cờ RegExp v, resizable ArrayBuffer, isWellFormed |
| ES2025 | Iterator helpers, Set methods, Promise.try, RegExp.escape, RegExp modifiers, duplicate named groups, import attributes & JSON modules, Float16Array |
| ES2026 | Array.fromAsync, Error.isError, Math.sumPrecise, Uint8Array base64/hex, Iterator.concat, JSON.parse source text & JSON.rawJSON, Map/WeakMap getOrInsert |
| ES2027 (Stage 4) | Temporal, using/await using & DisposableStack, Iterator.zip |
tc39/proposals) — xem tính năng nào đang ở stage nào.node:test, Vitest), end-to-end (Playwright).TIP
Cách học nhanh nhất là làm dự án: một trang todo có lưu localStorage, một ứng dụng thời tiết gọi API, một CLI bằng Node.js, rồi một ứng dụng full-stack nhỏ. Mỗi dự án sẽ buộc bạn dùng lại những gì đã học trong khóa này.
Chúc bạn code vui! 🚀
Comments