早期リターン
早期リターンをすると可読性が上がる
function handleConsole(a:string, b:string) { if (a != 'a' || b != (b) ) { return } if (a == "a") { console.log("a") } else if (b = "b") { console.log("b") } } function hello(a: string, b:string) { handleConsole(a,b) console.log("hello") } hello("ac","dd")