타입 추론
최종 수정 : 2024-05-28타입 추론타입 추론이 가능한 이유는 무엇인가?타입 추론이 가능한 조건은 무엇인가?1) 변수를 선언하고 초기화해줄 때let a = 10;let b = 'hello'; 2) 구조분해 할당// 객체의 구조분해 할당let c = { id: 1, name: 'yeongtaek', profile: { nickname: 'teadyeong', }, urls: ["https://www.naver.com"],};let { id, name, profile } = c;// 배열의 구조분해 할당let [one, two, three] = [1, 'hello', true]; 3) 함수의 반환값을 지정해줄 때function func() { return 'hello';} 4) 함수의 ..
2024. 5. 28.