Introduction

Promise.then()

const sampleFunction =() => {
	testFunc()
		.then(result => console.log(result))
}
const mainFunction = () => {
	firstFunc()
		.then(secondFunc()
			.then(thirdFunc()
				.then(forthFunc()
			...
			)
		)
	)
}

aync function

//then 활용 시
const sampleFunction =() => {
	testFunc()
		.then(result => console.log(result))
}
//await, async 활용시
const sampleFunction = async() => {
	const result = await testFunc()
	console.log(result)
}