ES2019? ECMAScript ??? ? ?? ??? ??? ?????. ??? ??? ????? Node.js, Chrome, Firefox ? Safari?? ?????. ?? ????? ???? ?? Babel? ???? ??? ??? ?? ??? JavaScript? ??? ? ?? ????.
?? ??? ??? ??? ? ??? ???!
Object.fromEntries
??
ES2017? ??? ?? ???? ???? Object.entries
???? ?????. ?? ??:
????? = { ???? : 20, ????? : 22, CECE : 20, Deirdre : 19, ???? : 21 } Object.entries (??) // [ // [ 'Amelia', 20], // [ 'Beatrice', 22], // [ 'Cece', 20], // [ 'deirdre', 19], // [ '????', 21] //]
?? ??? map
, filter
, reduce
?? ?? ?? ??? ??? ?? ? ?? ??? ??? ? ?? ??? ?? ?????. ??? ??? ??? ?? ????? ??? ??? ????? ?????.
????? = { ???? : 20, ????? : 22, CECE : 20, Deirdre : 19, ???? : 21 } // .filter () ??? ???? ?? ??? ?????. ?? ??> = 21 }) // [[ 'Beatrice', 22], [ 'Eloise', 21]] // ??? ??? ??? ???? DiskingAgestudents = {} (??? ?? ??, ??] { DrinkingAgestudents [name] = Age; } // {Beatrice : 22, Eloise : 21}
Object.fromEntries
???? ??? ????? ???????! ???? ?? ??? ?? ???? ????? ?? ? ? ??? ??? ??? ?????.
????? = { ???? : 20, ????? : 22, CECE : 20, Deirdre : 19, ???? : 21 } // .filter () ??? ???? ?? ??? ?????. ?? ??> = 21 }) // [[ 'Beatrice', 22], [ 'Eloise', 21]] // ??? ??? ??? ???? DiskingAgestudents = Object.Fromentries (Overtwentyone); // {Beatrice : 22, Eloise : 21}
??? ??? ??? ??? ??? ? ??? ???? ??? ??? ??? ? ????. ?? ??? ?? ??? ?? ?? ???? ??? ?????.
??? = [ [ '????', 22], [ 'Beatrice', 22], [ '????', 21], [ 'Beatrice', 20] ]] windentobj = Object.Fromentries (??); // {Amelia : 22, Beatrice : 20, Eloise : 21} // ? ?? ?????? ??????!
??? ??? ??? ? ??? ? ???? ?? ??????.
Object.fromEntries
?? ?? ??
?? | ??? ?? | ?? ?? | ???? |
---|---|---|---|
75 | 67 | 12.1 | ???? ???? |
Array.prototype.flat
???
??? ??? ?? ???? ?? ? ? ?? ???? ??? ?????. ??? ??? ?????? ??? ?????. ??? ?? ? ? ????? ??? ???? ????.
map
??? ?? ???? ??? ??? ???? ?? ?? ?????.
?? = [ { ?? : "??", ?? : 3, ??? ??? : 2, ?? : [ 'Janet', 'Martha', 'Bob', [ 'Phil', 'Candace']]]]] }, { ?? : "??", ?? : 2, ?? : [ '??', '???'] }, { ?? : "??", ?? : 4, ?? : [ 'Edith', 'Jacob', 'Peter', 'Betty']]] } ]] CourSestudents = courses.map (course => course.students) // [ // [ 'Janet', 'Martha', 'Bob', [ 'Phil', 'Candace'], // [ '??', '???'], // [ 'Edith', 'Jacob', 'Peter', 'Betty']]] //] [] .concat.apply ([], Coursestudents) //? ???? ???????
Array.prototype.flat
???? ??????. ??? ?? ?? ??? ?????.
CourSestudents = [ [ 'Janet', 'Martha', 'Bob', [ 'Phil', 'Candace']], [ '??', '???'], [ 'Edith', 'Jacob', 'Peter', 'Betty']]] ]] flattenonelevel = coursestudents.flat (1) Console.log (flattenonelevel) // [ // 'Janet', // 'Martha', // '?', // [ 'Phil', 'Candace'], // '??', // '???', // 'edith', // '??', // '??', // '??' //] flattentwolevels = coursestudents.flat (2) Console.log (FlattentWolevels) // [ // 'Janet', 'Martha', // '?', '?', // 'Candace', 'Wilson', // 'Taylor', 'Edith', // '??', '??', // '??' //]
?? ??? ???? ??? ?? ??? 1???.? ???? ??? ??? ?????? ?? ??? ?? ?????.
CourSestudents = [ [ 'Janet', 'Martha', 'Bob', [ 'Phil', 'Candace']], [ '??', '???'], [ 'Edith', 'Jacob', 'Peter', 'Betty']]] ]] defaultflattened = coursestudents.flat ()?? console.log (defaultFlattened) // [ // 'Janet', // 'Martha', // '?', // [ 'Phil', 'Candace'], // '??', // '???', // 'edith', // '??', // '??', // '??' //]
? ??? ??? ??? ????? ????? ??? ??? ???? ????? ???? ??? ???? ?????. Infinity
??? ???? ?? ?? ?? ??? ??? ? ?? ??? ??? ?????? ?????.
CourSestudents = [ [ 'Janet', 'Martha', 'Bob', [ 'Phil', 'Candace']], [ '??', '???'], [ 'Edith', 'Jacob', 'Peter', 'Betty']]] ]] Alwaysflattened = coursestudents.flat (Infinity) Console.log (?? ?? ??) // [ // 'Janet', 'Martha', // '?', '?', // 'Candace', 'Wilson', // 'Taylor', 'Edith', // '??', '??', // '??' //]
?? ???? ?? ?? ??????? ?????? ??? ??? ??? ???? ?? ?? ?? ?? ??? ?? ??? ?? ? ????.
Array.prototype.flat
??? ?? ??
?? | ??? ?? | ?? ?? | ???? |
---|---|---|---|
75 | 67 | 12 | ???? ???? |
?? ????? | Firefox Android | iOS ??? | ?, ??? | ?? ??? | ????? ? ? |
---|---|---|---|---|---|
75 | 67 | 12.1 | ???? ???? | ???? ???? | 67 |
Array.prototype.flatMap
???
flat
??? ???? ?? ? ?? Array.prototype.flatMap
? ????. ??? ??? ?? ??? ???? ?? ???? ?? ? ??.
??? ??? ????? ES2019? ??? ??? ???? ?? ??? ??????
?? = [78, 62, 80, 64] ?? = grades.map (grade => [grade, grade 7]) // [[78, 85], [62, 69], [80, 87], [64, 71]] flatmapped = [] .concat.apply ([], ??) // ?? ???? ??? ??? ? ??? // ??? ???? ?????. // 78, 85, 62, 69, // 80, 87, 64, 71 //]
?? Array.prototype.flat
?? ???? ??? ?? ?? ? ? ????.
?? = [78, 62, 80, 64] flatmapped = grades.map (grade => [grade, 7]). flat () // [ // 78, 85, 62, 69, // 80, 87, 64, 71 //]
??? ??? ??? ????? ??????? ??? ??? ???? ?????. ?? ??? ??? ???? ?? ????. flatMap
???? ??? ?? ? ? ????.
?? = [78, 62, 80, 64] flatmapped = grades.flatmap (grade => [grade, grade 7]); // [ // 78, 85, 62, 69, // 80, 87, 64, 71 //]
Array.prototype.flat
? ?? ?? ??? 1???. flatMap
?? ???? map
? flat
???? ?? ????. ??? flatMap
??? ? ? ???????.
?? = [78, 62, 80, 64] flatmapped = grades.flatmap (grade => [grade, [grade 7]]); // [ // 78, [85], // 62, [69], // 80, [87], // 64, [71] //]
Array.prototype.flatMap
??? ?? ??
?? | ??? ?? | ?? ?? | ???? |
---|---|---|---|
75 | 67 | 12 | ???? ???? |
?? ????? | Firefox Android | iOS ??? | ?, ??? | ?? ??? | ????? ? ? |
---|---|---|---|---|---|
75 | 67 | 12.1 | ???? ???? | ???? ???? | 67 |
String.trimStart
? String.trimEnd
???
ES2019? ?? ? ?? ?? ?? ??? ???? ?? ??? ?? ????? ???? ????. ???? String.trimRight
? String.trimLeft
??? ??????.
??? = "CS 101? ?? ?? ?????" message.trimright () // 'CS 101? ?? ?? ?????' message.trimleft () // 'CS 101? ?? ?? ?????' message.trimright (). trimleft () // 'CS 101? ?? ?? ?????'
???? ??? ?????, ??? ??? ? ??? ????? ?? ??????. ?? ? ? ??? ??????.
??? = "CS 101? ?? ?? ?????" message.trimend () // 'CS 101? ?? ?? ?????' message.trimstart () // 'CS 101? ?? ?? ?????' message.trimend (). trimstart () // 'CS 101? ?? ?? ?????'
String.trimStart
? String.trimEnd
??? ?? ??
?? | ??? ?? | ?? ?? | ???? |
---|---|---|---|
75 | 67 | 12 | ???? ???? |
??? catch
???
ES2019? ? ?? ?? ??? try-catch
?? ???? ?? ??? ??? ????. ???? ?? catch
??? ?? ??? ??? ??????. ??? catch
??? ??? ?????? ??? ????? ?? ?????.
???? { parsed = json.parse (obj) } catch (e) { // E? ????? Console.Log (OBJ)? ?????. }
? ?? ??? ????. catch
???? ??? ???? ??? ?? ??? ?? ????.
???? { parsed = json.parse (obj) } ?? { Console.log (OBJ) }
??? ???? ?? ?? ?? ????? ???? ?? ??? ??? ?? ?????.
?? catch
??? ?? ??
?? | ??? ?? | ?? ?? | ???? |
---|---|---|---|
75 | 67 | 12 | ???? ???? |
Function.toString()
??? ??
ES2019? ?? Function.toString()
???? ???? ??? ??????. ???? ??? ??? ???????.
?? ??? () { const name = 'css tricks' console.log (`hello from $ {name}`) } greeting.tostring () // 'function greeting () {\ nconst name = \'css tricks \ '\ nconsole.log (`hello from $ {name} //`) \ n}'
?? ?? ???? ??? ?? ??? ?????.
?? ??? () { const name = 'css tricks' console.log (`hello from $ {name}`) } greeting.tostring () // 'function greeting () {\ n' // "const name = 'css tricks'\ n" // 'console.log (`hello from $ {name}} \ n' // '}' '
??? ?? ?? ?????, ??? ???? ?? ??? ?? 2 ??? ?? ???? ? ??? ??? ?? ????.
Function.toString()
???? ??
?? | ??? ?? | ?? ?? | ???? |
---|---|---|---|
75 | 60 | 12 - ?? ?? | 17 - ?? ?? |
??? ES2019? ?? ??? ?????!
??? ??? ?? ??? ??? ?? ? ?? ????.
- ?? ??
- ?? ???
- JSON? ?? ????? ECMAScript
-
JSON.stringify
??? JavaScript ??????????!
? ??? ?? ??? ES2019 ?? ??? ?? ?????. ??? ??? 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)

CSS?? ????? ??? ? ?? ??? ????. 1. HTML ? CSS? ?? ??? ?????? ???? ?? ???? ?? ???? ??????. 2. ?? ??? ??? ?? ???? ???? ?? ?? ??? ?? ?? ??? ??????. 3. ??? ????? ???? JavaScript? ?? ???? ?????? ??? ?????. ? ?? ??? ??? ??? ????? ?? ??, ??, ??? ? ?? ???? ?? ?? ?? ??? ???? ?????.

CSS ???? ??? ? ??? ??? ????? ???? ??? ???? ???? ?? ?? ???? ????? ???????. 1. Flexbox ? ??? ??? ?? ???? ??? ??, ?? : ??? ?? ? ????? ??? ????. 2. Caniuse ?? ?? ?? ??? ??????. 3. -webkit-, -moz-, -ms-, -o- ? ?? ???? ???? ???? ?????. 4. AutoPrefixer? ???? ???? ???? ???? ?? ????. 5. ?? ????? ????? PostCSS? ???? BrowsersList? ??????. 6. ?? ? ???? ???? ?????. 7. Modernizr ?? ??? ??? ????? ??? ? ????. 8. ?? ????? ???? ?? ? ??? ????.

themaindifferencesbetweendisplay : ???, ??, andinline-blockinhtml/cssarelayoutbehavior, spaceusage ? stylingcontrol.1.inlineElementsFlowWithText, do n'tStartonnewlines, ingorewidth/height, andonlyapplyhorizontalpadding/margins —IdealforIneTeTexting

CSS? ?? ?? ??? ??? ??? ???? ???? SVG? ???? ?? ???, ?? ????, ??? ?? ?? ??? ?? ???? ??????. ??? ??? ????. 1. ?, ??, ??? ?? ?? ??? ?? ??? ?????. 2. ?? ?? ? ??? ???? ??? ? ????. 3. ?????? ?? ?? ?? ?? ????? ???? ?? ??? ?? ? ? ????. 4. ???? ???? ??? ??? ??? ????? ?? ? ??? ????. ???? ???? ?? ?? ?? : ? (50pxatcenter) ? ??? ?? ?? : ??? (50%0%, 100 0%, 0%)? ?? ????. ????

??? ?? ???? ???? ??? ??, ?? ??? ??? ? ? ????? ??? ??? ???? ???? ? ? ?? ? ? ????. 1. CSS ?? : ?? ??? ???? ???? ?? ??; 2. ????? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 3. ?? ??? ??? ??? ??? ?? ?? ???? ????????. 4. ??? ????? ??? ???? ?? ? ??? ??? ?? ??? ?? ?? ??? ????? ???? ?? ????.

CSS? ???? ?? ? ???? ???? ??? ?? ??? ?? ?? ?? ? ? ????. 1. Max width : 100% ? ?? : Auto? ???? ???? ??? ????? ???? ??? ??? ? ??????. 2. HTML? SRCSET ? ?? ??? ???? ?? ??? ??? ??? ??? ???????????. 3. ?? ?? ? ?? ??? ???? ??? ??? ? ?? ?????? ??????. ? ??? ?? ???? ?? ???? ???? ???? ????????.

?? ????? CSS ?? ??? ????? ?? ?? ??? ??, ?? ?? ?? ??, Flexbox ? ??? ???? ?? ?? ? ?? CSS ??? ????? ??? ???? ???? ?? ????? ??? ?????. 1. ?? ??? ??? ???? ????. ???? CSSRESET ?? NALLER.CSS? ???? ?? ???? ???? ????. 2. IE? ?? ??? ?? ?? ?? ??? ????. ?? ?? : ?? ? ???? ??? ??? ???? ?? ????. 3. Flexbox ? Grid? Edge Case ?? Old ???? ??? ?????. ? ?? ??? ? AutopRefixer ??; 4. ?? CSS ?? ??? ???? ????. Caniuse? ???? ?? ?????????.

CSS ??? ??? ?? ?? ?? ? ?? ? ?? ??? ?? ????. 1.px? ?? ??? ????? ?? ??? ??? ?? ??? ?????. 2.EM? ?? ????, ?? ?? ??? ??? ?? ?? ???? ??, REM? ?? ??? ???? ? ????? ??? ????? ?????. 3.VW/VH? ?? ? ???? ??? ??? ??? ??????? ?? ???? ?????? ???????. 4. ??? ?? ?? ? ??, ?? ?? ?? ? ??? ???? ???? ???????. ???? ??? ???? ??? ? ?? ??? ???? ? ????.
