3. Let and Const Declaration
let - block level scopes를 가질 수 있다.
= global scope에서 변수를 선언한 후에,
loop나 if문 안에서 똑같은 변수를 선언한다면,
둘은 완전히 다른 변수가 된다.
"use strict"
var를 썼을 때,
7행에서 변수 a를 global scope로 30으로 set했다.
if문 안에서 변수 a를 50으로 set했다.
let을 썼을 때,
18행이 16행을 change하지 않는다.
const - push는 가능하지만 change는 불가능
4. Classes and Inheritance
constructor
- class가 instantiate될 때
(= object가 create될 때)
run하는 메소드
- parameter를 take in할 수 있다.
object를 instantiate하기 위해 사용하는 변수(bob)를 쓰고,
call하기를 원하는 메소드를 쓰면 된다.
< static method >
※ static을 쓰지 말아야 할 경우
- register
∵ you need to instantiate an object
in order to do it all right
class 이름. 메소드 이름();
< inherit / extend >
5. Template Literals
함수도 쓸 수 있다.
6. New String & Number Methods
7. Default Params & Spread Operator
spread operator
8. Set, Map, WeakSet and WeakMap
weakSet, weakMap - object 관련
9. Arrow Functions
10. Promises
11. Generators
'JavaScript > Youtube' 카테고리의 다른 글
JavaScript/Youtube_sort() (0) | 2020.07.01 |
---|---|
JavaScript/Traversy Media - ES6 - 1. Introduction, 2. Compile ES6 With Babel (0) | 2020.06.23 |
JavaScript/Traversy Media - Higher Order Functions & Arrays (0) | 2020.06.22 |
JavaScript/freeCodeCamp - Full Course for Beginners (0) | 2020.06.16 |
JavaScript/freeCodeCamp - Full Course for Beginners 2:36:57~3:15:06 (0) | 2020.06.16 |
댓글