일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- ES5+
- dev
- 우아한테코톡
- 함수
- hooks
- github
- Python
- JS
- ES6+
- learn next.js
- 선택자
- html5
- object
- git
- 변수
- hatso
- array
- next.js
- es6
- react
- gitCLI
- 햇소
- CSS
- JavaScript
- 최적화
- This
- AI
- developerlife
- API
- DOM
- Today
- Total
목록object (4)
codinghatso

참고 : Link - ( https://ko.javascript.info/destructuring-assignment ) 객체와 배열은 자바스크립트에서 가장 많이 쓰이는 자료 구조입니다. 키를 가진 데이터 여러 개를 하나의 엔티티에 저장할 땐 객체를, 컬렉션에 데이터를 순서대로 저장할 땐 배열을 사용하죠. 개발을 하다 보면 함수에 객체나 배열을 전달해야 하는 경우가 생기곤 합니다. 가끔은 객체나 배열에 저장된 데이터 전체가 아닌 일부만 필요한 경우가 생기기도 하죠. 이럴 때 객체나 배열을 변수로 '분해’할 수 있게 해주는 특별한 문법인 구조 분해 할당(destructuring assignment)을 사용할 수 있습니다. 이 외에도 함수의 매개변수가 많거나 매개변수 기본값이 필요한 경우 등에서 구조 분해(..

JS는 window라는 거대한 오브젝트 안에서 구현되는 형식을 취하고 있다. 전역에서 this를 출력하면 window 오브젝트가 호출되는 모습을 볼 수 있다. window는 모든 전역변수, 함수, DOM을 보관하고 관리하는 전역객체이다. this는 나를 담고 있는 오브젝트를 출력해준다. function person(){ this.name = 'kim' } 여기에서 this는 새로 생성되는 오브젝트(instance)이다. constructor(생성자) 안에서 사용하면 constructor로 새로생성되는 오브젝트를 뜻합니다. constructor는 오브젝트를 복사해서 생성해주는 장치입니다.

ECMAScript 3rd 1999 Object { key : value} 형식의 문서 JSON simplest data interchange format lightweight text-based structure easy to read key-value pairs used for serialization and transmission of data between the network the network connection independent programming language and platform 번역 간단한 데이터 교환 형식 (데이터를 주고 받을 때 가장 간단한 파일 포맷이다.) 경량 텍스트 기반 구조 (텍스트 기반의 가벼운 구조.) 읽기 쉬운 키-값 쌍 네트워크 연결 네트워크 간 데이터의 직..

/** * Objects * one of the JavaScript's data types. * a collection of related data and/or functionality. * Nearly all objects in JavaScript are instances of Object * object = {key : value}; */ // 1. Literals and properties const obj1 = {}; // 'object literal' syntax const obj2 = new Object(); //'object constructor' syntax function print(person) { console.log(person.name); console.log(person.age)..