📖 TIL/JavaScript
[JS] Data type 과 Properties 그리고 Method
성란
2022. 1. 20. 23:06

1. Data type(자료형)
Boolean | Null | Undefined | Symbol | Object | String | Number |
참과 거짓 | 선언⭕ 할당⭕ | 선언⭕ 할당❌ | 변경 불가능한 원시 타입의 값 | 객체 |
2. Properties
.length : 문자열의 문자 갯수를 알려주는 명령어
3. Method
- 해당번째를 알려주는 메소드
'Hello Wolrd'.indexOf("W"); // 6
- 공백 삭제
.trim()
- document 객체 속의 메소드로, document안에 있는걸 선택할 때 쓴다.
.querySelector('')