타입스크립트가 자동으로 타입을 추론함
let a = 10;
let b = "hello";

let c = {
id: 1,
name: "이정환",
profile: {
nickname: "winterlood",
},
urls: ["https://winterlood.com"],
};

let {id, name, profile} = c;

let [one, two, three] = [1, "hello", true];

→ 웬만한 변수선언은 자동으로 추론함
function func() {
return "hello";
}

function func(message = "hello") {
return "hello";
}

let d;

let d;
d = 10;

let d;
d = 10;
d = "hello";
d


→ any타입의 진화 (암묵적인 any타입)
→ 명시적으로 any타입을 지정해주는 것과는 다름
const num = 10;

const str = "hello";

let arr = [1, "string"];

→ 최적의 공통 타입으로 추론해줌
참고: 타입 넓히기
프로그래머가 범용적으로 변수를 사용할 수 있도록 타입스크립트가 넓은 타입으로 추론하는 과정