일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
29 | 30 |
- 코드 중복제거
- Javascript
- SpringBatch 스키마
- Spring Entity
- react
- springbatch
- react react-router-dom v6
- react Quill
- react jsx if
- springbatch chunk
- Docker Windows 설치
- react quill custom
- spring builder
- spring security
- react Page
- JPA Update\
- Spring JPA
- step 테이블
- react link
- javascript 함수
- Spring DTO
- Spring Controller return
- javascrpit 기초
- spring
- react forwardRef
- JPA Insert
- javascript 기초
- 텍스트가 많은 경우
- editor Quill
- Spring CORS
- Today
- Total
목록JavaScript (21)
천천히 알아보는 코딩공부

실행 컨텍스트 개념 - ECMAScriprt 에서는 실행 컨텍스트를 "실행 가능한 코드를 형상화하고 구분하는 추상적인 개념"으로 기술한다. - 햔재 실행되는 컨텍스트에서 이 컨텍스트와 관련 없는 실행 코드가 실행되면, 새로운 컨텍스트가 생성되어 스택에 들어가고 제어권이 그 컨텍스트로 이동한다. console.log("This is global context"); function Excontext1() { console.log("this is Ex context1"); }; function ExContext2() { ExContext1(); console.log("this is Ex context2"); }; ExContext2(); 출력결과 This is global context This is ExCo..

○ 프로퍼타입 체이닝 - 자바스크립트에서 객체는 자기 자신의 프로퍼티뿐만이 아니라, 자신의 부모 역할을 하는 프로토타입 객체의 프로퍼티 또한 마치 자신의 것처럼 접근하는 게 가능하다. 이것을 가능케 하는 게 바로 프로토타입 체이닝이다. @ 객체 리터럴 방식으로 생성된 객체의 프로토타입 체이닝 ex) 객체 리터럴 방식에서의 프로토타입 체이닝 var myObject = { name : 'foo', sayName : function() { console.log('My name is' + this.name); } }; myObject.sayName(); // my name is foo console.log(myObject.hasOwnProperty('name')); //true console.log(myObje..
○ 함수리턴 - 자바스크립트 함수는 항상 리턴값을 반환한다. 1. 규칙 1) 일반 함수나 메서드는 리턴값을 지정하지 않을 경우, undefined 값이 리턴된다. function myFunction() { console.log('this function has no return statement'); } var result = noReturnFunc(); console.log(result); //undefined 2. 규칙 2) 생성자 함수에서 리턴값을 지정하지 않을 경우 생성된 객체가 리턴된다. function person1(name, age, gender) { this.name =name; this.age =age; this.gender =gender; return {name : 'bar', age ..

○ 함수 호출과 this @ arguments 객체 - C와 같은 엄격한 언어와 달리, 자바스크립트에서는 함수를 호출할 때 함수 형식에 맞춰 인자를 넘기지 않더라도 에 러가 발생하지 않는다. function func(arg1, arg2) { console.log(arg1, arg2); } func(); // undefined undefined func(1); // 1 undefined func(1, 2); // 1 2 func(1, 2, 3); // 1 2 @ 호출 패턴과 this 바인딩 - 함수를 호출할 때 arguments 객체 및 this 인자가 함수 내부로 암묵적으로 전달된다 - this가 이해하기 어려운 이유는 자바스크립트의 여러 가지 함수가 호출되는 방식에 따라 this가 다른 객체를 참조하기..
○ length 프로퍼티 function func0() { } function func0(x) { return x; } function func0(x, y) { return x + y; } function func0(x, y, z) { return x + y + z; } console.log('func0.length -' + func0.length); // func0.length - 0 console.log('func1.length -' + func1.length); // func1.length - 1 console.log('func2.length -' + func2.length); // func2.length - 2 console.log('func3.length -' + func3.length); //..