? ????? ?? ??? ???? ? Array.prototype.at()
? Array[index]
?? ? ???? ??? ???????.
????
???? ?? ??? ??? ? Array[index]
?? Array[1]
? ???? ????. ??? ?? ??? ??? ?? ??? ?? ??? ?? ?????.
?? ??? ?? ?? ???? "??? ?? ???? ?? Array.prototype.at()
? ???? ?????"?? ?????.
const element = arr[1];?? ???? ??? ?? ??????:
const element = arr.at(1);? ?? ??? ?? ???? ????? ??? ??? ?? ???.
Array.prototype.at() ?? ??
? ??? ??? ????? ??? ?? ??? ?????. Array.prototype.at()
const arr = ["One", "Two", "Three"];??:
arr.at(0); // 返回 "One"??? ??
? ?????. ???? ???? ????? ?? ????. ???? ? ?? ??? ??? ?? ??? ???????. array[0]
Array[index]? ????? ?? ??? ??????
?? Array.prototype.at()
? ???? ?? ? ?? ????? ???????. Array[index]
??? ??? ??? ?????.
const sports = ["basketball", "baseball", "football"];??? ??? ?? "football"? ????? ??? ?? ??? ? ????.
const lastElement = sports[sports.length - 1];??? ??? ?? ?????
??? ???? ? ???? ??? ? ????. Array.prototype.at()
const lastElement = sports.at(-1);???? ? ????
?? ??
TypeScript??? ??? ????
? ???? ????. undefined
const arr: string[] = []; const element = arr[0]; console.log(element); // undefined
? ??? element
? ?? string
?? ?????. string | undefined
????? ??? ????? ?? ??? ????? ????? ???.
const arr: string[] = []; const element = arr[0]; if (typeof element === 'string') console.log(element);??? ?? TypeScript?
? ???? ?? ??? ???? ??? ????. string
const element: string | undefined = arr[0];??? ??? ??? ???? ?? ??? ??? ??? ? ?? ??? ?? ????? ????.
? ??? ???? ?? ?? ? ?? ?? ??? ?? ? ????.
- ?? ?? ?? ??
- ???? ?? ??
noUncheckedIndexedAccess
? ???? ? ?? ??? ?? ??? ??? ????. Array.prototype.at()
const arr: string[] = []; const element = arr.at(0); // string | undefined console.log(element);
??? ?? ?? element
? ????? ?? ??? ??? ?????. string
const element = arr[1];
??
Array.prototype.at()
? ???? ? ??? ??? ???? ?? ?? ? ??? ???? ??? ???.
Array.prototype.at()
Mozilla ??? ???? ??: ?? (?? ??? ?????)
? ??? Array[index] ?? Array.at() ??? ?? ?????. ??? ??? 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)

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

JavaScript ??? ??? ?? ?? ? ?? ???? ????. ?? ???? ???, ??, ??, ?, ???? ?? ? ??? ?????. ?? ????? ?? ?? ? ? ??? ????? ?? ??? ??? ????. ??, ?? ? ??? ?? ?? ??? ??? ??? ???? ??? ??? ???? ??? ?? ??? ????. ?? ? ????? ??? ???? ? ??? ? ??? TypeofNull? ??? ?????? ??? ? ????. ? ? ?? ??? ???? ?????? ????? ???? ??? ???? ? ??? ? ? ????.

?? JavaScript ??? ??? ??? ?????? ?? ??? ?? ?? ??? ?? ???? ????. 1. ??? ???? ???? ?? ??? ?? ? ? ???? ??? ??? ?? ? ?? ????? ?????. 2. Angular? ?????? ??? ?? ???? ? ?? ?? ??? ??? ??? ???? ?????. 3. VUE? ???? ?? ??? ???? ?? ?? ??? ?????. ?? ?? ?? ??, ? ??, ???? ???? ? SSR? ???? ??? ??? ??? ???? ? ??? ?????. ???, ??? ??? ??? ????? ????. ??? ??? ??? ??? ?? ????.

?????, JavaScript ???! ?? ? JavaScript ??? ?? ?? ?????! ?? ?? ??? ??? ??? ? ????. Deno?? Oracle? ?? ??, ??? JavaScript ?? ??? ????, Google Chrome ???? ? ??? ??? ???? ?????. ?????! Deno Oracle? "JavaScript"??? ????? Oracle? ?? ??? ??? ??????. Node.js? Deno? ??? ? Ryan Dahl? ??? ?????? ???? ????? JavaScript? ??? ???? Oracle? ????? ???? ?????.

Cacheapi? ?????? ?? ???? ??? ???? ???, ?? ??? ??? ?? ???? ? ??? ?? ? ???? ??? ??????. 1. ???? ????, ??? ??, ?? ?? ?? ???? ???? ??? ? ????. 2. ??? ?? ?? ??? ?? ? ? ????. 3. ?? ?? ?? ?? ?? ??? ??? ?? ?????. 4. ??? ???? ?? ?? ???? ?? ?? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 5. ?? ???? ??, ??? ??? ? ??? ??, ?? ??? ? ?? ???? ???? ???? ? ?? ?????. 6.?? ??? ?? ?? ?? ??, ???? ?? ? HTTP ?? ????? ?????? ???????.

??? JavaScript?? ??? ??? ?????? ?? ???????. ?? ??, ?? ?? ? ??? ??? ?? ????? ????? ?????. 1. ?? ??? ??? ????? ???? ??. ()? ?? ??? ??? ?????. ?. ()? ?? ??? ?? ??? ??? ?? ? ? ????. 2. ?? ??? .catch ()? ???? ?? ??? ??? ?? ??? ??????, ??? ???? ???? ????? ??? ? ????. 3. Promise.all ()? ?? ????? (?? ?? ?? ? ??????? ??), Promise.Race () (? ?? ??? ?? ?) ? Promise.AllSettled () (?? ??? ???? ??)

.map (), .filter () ? .reduce ()? ?? JavaScript ?? ?? ???? ??? ??? ??? ? ? ????. 1) .map ()? ??? ??? ??? ???? ? ??? ???? ? ?????. 2) .filter ()? ???? ??? ????? ? ?????. 3) .reduce ()? ???? ?? ??? ???? ? ?????. ???? ??? ????? ??? ?? ?? ??? ?????.

JavaScript? ??? ??? ?? ??, ? ? ? ?? ???? ???? ??? ??? ?????. 1. ?? ??? ?? ??? ???? ??? ??? ??? ??? ?? WebAPI? ?????. 2. WebAPI? ??????? ??? ?? ? ? ??? ?? ??? (??? ?? ?? ???? ??)? ????. 3. ??? ??? ?? ??? ?? ??? ?????. ?? ??? ??? ????? ??? ??? ?? ? ???? ?????. 4. ???? ?? (? : Promise. 5. ??? ??? ???? ?? ???? ???? ?? ?? ?? ??? ????? ? ??????.
