1. Call Stack
- Maximum call stack size exceeded
function hello() {
say();
}
function say() {
hello();
}
hello();
2. Primitive types
string ""
\ eascape
"Hello \"the awsome girl"\ !"
Boolean
Undefined //정의되지 않음
Null //존재하지 않음 - value
symbol //ES6
NaN //Not a number
Typeof
3. Value Types and Reference Types
Value: string, number, boolean, Nan, undefined, null
Reference: array, object, funtion
console.log([10] === [10])
console.log({'a': 20} === {'a': 20})
4. Type Coercion (Conversion)
console.log(4 + "hello")
console.log(4 + 4+ "hello")
console.log("" == true)
console.log(1 == true)
console.log(66 + true)
loaded operator
console.log(25 - "1")
console.log("" == true) // 빈스트링은 0 으로 변환됨
console.log(0 == true)
console.log(NaN == true)
console.log(undefined == true)
console.log(null == true)
console.log(null == false)
=== -> type coercion 안일어남
참고.
https://github.com/leonardomso/33-js-concepts
https://www.youtube.com/watch?v=dIIQmSsg0SI&feature=share
반응형
'Platform > BackEnd' 카테고리의 다른 글
[Server] json-server 사용하기(간단하게 올리는 로컬 서버) (0) | 2022.04.27 |
---|---|
[Push] FCM (0) | 2021.10.16 |
[javascript] 구글스프레드시트에서 읽어오기-(0)(ERROR1) (0) | 2021.08.03 |
[javascript] 구글스프레드시트에서 읽어오기-(0)(ERROR2) (0) | 2021.08.03 |
[javascript] 구글스프레드시트에서 읽어오기 - (1) (0) | 2021.08.03 |