본문 바로가기
Programing Language/Javascript

[Javascript] 알면 좋은 용어 정리

by pcm9881 2022. 7. 5.

 

 표현  한글  영문
 ...  전개 구문  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

 

728x90

댓글