표현 | 한글 | 영문 |
... | 전개 구문 | Spread syntax |
let arr = [1,2,3]
console.log([...arr, 4]) // 결과: 1,2,3,4
표현 | 한글 | 영문 |
{} | 객체 초기자 | Object initializer |
var user = {}
표현 | 한글 | 영문 |
() ? true : false | 삼항 연산자 | Conditional (ternary) operator |
참조
- 전개 구문 : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
Spread syntax (...) - JavaScript | MDN
Spread syntax (...) allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where ze
developer.mozilla.org
- 객체 초기자 : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer
Object initializer - JavaScript | MDN
Objects can be initialized using new Object(), Object.create(), or using the literal notation (initializer notation). An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in cu
developer.mozilla.org
- 삼항 연산자: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator
Conditional (ternary) operator - JavaScript | MDN
The conditional (ternary) operator is the only JavaScript operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execu
developer.mozilla.org
'Programing Language > Javascript' 카테고리의 다른 글
[Javascript] 문자열 자르기 (slice, substr, substring) (0) | 2023.03.22 |
---|---|
[Javascript] fetch 파일 업로드 예제 (0) | 2023.02.21 |
[Javascript] A form label must be associated with a control. (0) | 2022.11.01 |
[Javascript] 소수점 계산시 오류 (0) | 2022.10.31 |
[Javascript] Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body. (0) | 2022.10.18 |
댓글