Platform/BackEnd

[javascript] Concept 33. 4까지

개랭갱깽스타 2021. 8. 12. 13:37

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

 

GitHub - leonardomso/33-js-concepts: 📜 33 JavaScript concepts every developer should know.

📜 33 JavaScript concepts every developer should know. - GitHub - leonardomso/33-js-concepts: 📜 33 JavaScript concepts every developer should know.

github.com

 

https://www.youtube.com/watch?v=dIIQmSsg0SI&feature=share 

 

반응형