8??: ?? JavaScript ??
??: 2024? 12? 15?
8??? ?? ?? ?????! ?? ??? ????? ??? ????? ?? ???? ??? JavaScript ?? ? ??? ?????. ???? ?? ES6 ??, Promise ? async/await? ??? ??? ?????, try-catch? ??? ???? ?? ??? ?????. ??? ??? ????? ?? ?? ?? ?? ??? JavaScript ??????? ???? ? ??????.
1. ES6 ?? ??
ES6(ECMAScript 2015??? ?)?? JavaScript? ?? ???? ??? ????? ??? ?? ??? ???????. ? ?? ?? ??? ?? ??? ?????.
????
?? ??? ???? ???? ?? ????? ???? ??? ???? ???? ??? ???? ??? ??? ? ????.
?: ?? ?? ??
const numbers = [1, 2, 3]; const [first, second, third] = numbers; console.log(first, second, third); // Output: 1 2 3
?: ?? ?? ??
const user = { name: "Alice", age: 25 }; const { name, age } = user; console.log(name, age); // Output: Alice 25
??? ???
??? ???? ??? ???? ?? ? ???? ???? ??? ??? ??????.
?: ??? ??
const name = "John"; const greeting = `Hello, ${name}! Welcome to JavaScript.`; console.log(greeting); // Output: Hello, John! Welcome to JavaScript.
?: ?? ? ???
const message = `This is a multi-line string using template literals.`; console.log(message);
2. ??? ???/??
??
Promise? ??? ??? ?? ?? ?? ??? ???? ?????.
?: Promise ??
const fetchData = new Promise((resolve, reject) => { let dataLoaded = true; if (dataLoaded) { resolve("Data fetched successfully!"); } else { reject("Failed to fetch data."); } }); fetchData .then((data) => console.log(data)) // Output: Data fetched successfully! .catch((error) => console.error(error));
???/??
async/await? ??? ??? ?? ???? ??? ????? ??? ??? ???? ? ??? ?????.
?: async/await ??
const fetchData = () => { return new Promise((resolve, reject) => { setTimeout(() => resolve("Data loaded!"), 2000); }); }; const getData = async () => { console.log("Fetching data..."); const data = await fetchData(); console.log(data); // Output: Data loaded! }; getData();
3. try-catch? ??? ?? ??
?? ?? ??, ?? ??? ???? ??? ??? ? ????. ??? ??? ???? ???? ??? ??? ??? ?????.
?: ?? try-catch
try { let result = 10 / 0; console.log(result); // Output: Infinity } catch (error) { console.error("An error occurred:", error.message); }
Async/Await? try-catch ??
??? ??? ??? ?? try-catch? ???? ??? ?????.
const fetchData = () => { return new Promise((resolve, reject) => { let success = false; if (success) { resolve("Data fetched!"); } else { reject("Failed to fetch data."); } }); }; const getData = async () => { try { const data = await fetchData(); console.log(data); } catch (error) { console.error("Error:", error); } }; getData();
4. ?? ?? ??
??? ??? ?? ??? API?? ??? ??? ????? ??? ?????.
?: Async/Await ? ?? ??? ???? ??? ????
const numbers = [1, 2, 3]; const [first, second, third] = numbers; console.log(first, second, third); // Output: 1 2 3
5. ?? ???
- ?? ??: ?? ? ?? ??? ??????.
- ??? ???: ??? ??? ? ?? ????.
- Promise ? Async/Await: ??? ??? ????? ?????.
- ?? ??: try-catch? ???? ??? ???? ?????.
8?? ?? ??
- ?? ??? ???? ???? ?? ??? ?????.
- async/await? ???? ?? API?? ???? ???? ??? ?????.
- ???? ??? ???? ?? ???? ????? ??? ?? ??? ?????.
?? ??
?? 9???? JavaScript ?? ? ???? ?? ??? ???? JavaScript? ??? ? ?? ??? ??? ???????. ? ??? ? ???? ???? ??? ???? ? ??? ???. ?? ? ???!
? ??? ?? JavaScript ?? promise, async/await ? try-catch? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











JavaScript?? ??? ??? ?? ? ? ?? ??? ???????. 1. ?? ??? ??? ???? ?? ??? ????. ISO ?? ???? ???? ???? ???? ?? ????. 2. ?? ??? ?? ???? ??? ?? ???? ??? ? ??? ? ?? 0?? ????? ?? ??????. 3. ?? ?? ???? ???? ???? ?? ?????? ??? ? ????. 4. Luxon? ?? ???? ???? ?????? ???? ?? ????. ??? ?? ???? ????? ???? ??? ????? ?? ? ????.

TAGGSATTHEBOTTOMOFABLOGPOSTORWEBPAGESERVESPRACTICALPURSEO, USEREXPERIENCE, andDESIGN.1.ITHELPSWITHEOBYOWNSESPORENGENSTOESTOCESKESKERKESKERKERKERDER-RELEVANTTAGSWITHOUTHINGTEMAINCONTENT.2.ITIMPROVESEREXPERKEEPINGTOPONTEFOCUSOFOFOFOCUSOFOFOFOCUCUSONTHEATECLL

??? ?? ? ??? DOM?? ??? ??? ? ?????. ??? ?? ????? ?? ??????, ??? ?? ???? ?? ????????. 1. ??? ??? addeventListener? usecapture ?? ??? true? ???? ?????. 2. ??? ??? ?? ???? usecapture? ???? ????? ?????. 3. ??? ??? ??? ??? ???? ? ??? ? ????. 4. ??? ?? ?? ?? ??? ?? ??? ??????? ??? ???? ?????. 5. ??? ?? ?? ?? ??? ?? ???? ?? ???? ? ??? ? ????. ? ? ??? ???? ???? JavaScript? ??? ??? ??? ????? ???? ???? ??? ??????.

JavaScript ?? ????? ??????? ??? ?? ??? ??? ????? ?? ??? ????. ????? ??? ?????. 1. ?? ?? (CodesPlitting) ??, ?? ??? React.lazy ()? ?? ?? ?? ?? ??? ????? ??? ???? ? ?? ????? ??? ?? ??? ???????. 2. ???? ?? ?? (???)? ????, ES6 ?? ????? ???? "Dead Code"? ???? ?? ? ????? ?? ??? ??? ? ???????. 3. ?? ??? ???? ???? GZIP/BROTLI ? TERSER? JS? ???? ??? ????? ???? ?? ???? ??? ? ? ??????. 4. ??? ???? ???? day.js ? fetch? ?? ?? ?????? ??????.

ES ??? CommonJS? ?? ???? ?? ?? ? ?? ???????. 1. Commonjs? ????????? Node.js ?? ? ??? ?????. 2.ES ??? ???????? ????? ?? ???? ??? ?????. 3. ??, ES ??? ?? ??/????? ???? ??? ??? ?????? CommonJS? Quiew/Module.exports? ???? ???? ???? ?? ? ? ????. 4. Commonjs? Express? ?? ???? Node.js ? ?????? ?? ???? ?? ???? ?? ES ??? ?? ??? ?? ??? ?? ? Node.jsv14? ?????. 5. ?? ? ? ??? ?? ??? ??? ? ????.

Node.js?? HTTP ??? ???? ? ?? ???? ??? ????. 1. ?? ????? ????? ??? ??? ? ?? ????? ?? ?? ? https.get () ??? ?? ??? ??? ? ?? ????? ?? ??? ?????. 2.axios? ??? ???? ? ?? ??????. ??? ??? ??? ??? ??? ??? ???/???, ?? JSON ??, ???? ?? ?????. ??? ?? ??? ????? ?? ????. 3. ?? ??? ??? ??? ??? ???? ???? ??? ??? ???? ?????.

???? ?? ?? ??? JavaScript ??? ????? ?? 4 ?? ??????. 1. ???? ??? ?? ?? ??? ???? ?? ??? Count? ?? ??? ?? ???? ?? ??? FetchData ()? ?? ??? ???? ??? ??? ??? ????? ?? PascalScase? ?? ?????. 2. ???? ? ??? ???? ??? ? ??? ??? ??? Formatuser, SaveUser ? RenderUser? ???? ?? ?? ? ??? ?????. 3. Page? userprofile, Userstats ? React? ?? ???? ???? ? ??? ? ?? ???? ????? ??????. 4. ?? ?? ? ???? ??? ??? ? ???? ??? ??? ??????.

VAR, Let ? Const? ???? ??, ?? ? ?? ?????. 1.var? ?? ??????? ?? ???? ?? ? ??? ?????. 2. let? ?? ?? ????? ?? ?? ???? ?? ? ??? ???? ????. 3. ???? ?? ?? ???? ?? ??????? ? ?? ? ? ??? ?? ??? ?? ?? ??? ? ????. ?? const? ???? ??? ??? ? LET? ???? VAR? ???? ????.
