Javascript Refresh
4540 ワード
[1] let & const
[2] Arrow Functions // 기본 함수 문법
function myFunc() {
...
}
// 화살표 함수 문법
const myFunct = () => {
...
}
// 기본 함수 문법
function myFunc() {
...
}
// 화살표 함수 문법
const myFunct = () => {
...
}
本明細書では、returnのみを返す場合は、returnを省略して1行に短縮できます.
const muliply = (number) => {
return number * 2;
}
const mulltiply = (number) => number * 2;
[3] Exports & Imports (Modules)
[4] Classes
[5] Classes, Properties & Methods
[6] Spread & Rest Operators
const numbers = [1, 2, 3];
const newNumbers = [...numbers, 4]; // [1, 2, 3, 4]
(1つ以上のパラメータを受信して配列に結合する)
function sortArgs(...args) {
return args.sort()
}
[7]設計(分配構造分解)
Easily extract array elements or object properties and store them in variables
// Array Destructuring : 순서가 어떤 속성을 취할지 정함
[a, b] = ['Hello', 'Max']
console.log(a) // Hello
console.log(b) // Max
// Object Destructuring : 속성의 이름이 어떤 속성을 취할지 정함
{name} = {name: 'Max', age: 28}
console.log(name) // Max
console.log(age) // undefined
[8] Array Functions const numbers = [1, 2, 3];
const doubleNumArray = numbers.map((num) => num * 2);
map()
=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map find()
=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find findIndex()
=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex filter()
=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter reduce()
=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce?v=b concat()
=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat?v=b slice()
=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice splice()
=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice
Reference
この問題について(Javascript Refresh), 我々は、より多くの情報をここで見つけました
https://velog.io/@yurileeeee/Javascript-Refresh
テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol
const numbers = [1, 2, 3];
const doubleNumArray = numbers.map((num) => num * 2);
Reference
この問題について(Javascript Refresh), 我々は、より多くの情報をここで見つけました https://velog.io/@yurileeeee/Javascript-Refreshテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol