From 414efef028c4698c3262e072c0b78eeb66ff9d66 Mon Sep 17 00:00:00 2001 From: Wu Xudan Date: Sat, 26 Oct 2024 23:15:07 +0800 Subject: [PATCH] Update Ayden&Fluency.md learn es6 --- Ayden&Fluency.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Ayden&Fluency.md b/Ayden&Fluency.md index d51de56..27a30bd 100644 --- a/Ayden&Fluency.md +++ b/Ayden&Fluency.md @@ -272,7 +272,14 @@ timezone: Asia/Shanghai - Modules: Import and export syntax for modular code. - Promises: For asynchronous operations. - Async/Await: For writing asynchronous code that looks synchronous. + ### 2024.10.26 +- let and const: + let allows you to declare variables that are limited to the block scope (enclosed by {}), unlike var, which is function-scoped. + const is used to declare constants that cannot be reassigned, also scoped to the block. +- Arrow functions provide a more concise syntax for writing function expressions. They also lexically bind the this value, which is particularly useful in callbacks. +- Template literals allow for multi-line strings and string interpolation using backticks (`). You can embed expressions inside ${}. +- Destructuring allows unpacking values from arrays or properties from objects into distinct variables. ### 2024.10.27 ### 2024.10.28