typescript

for-of 문

나빈스 코딩 2025. 8. 14. 15:46

타입스크립트에서는 "배열"을 for-of문을 통해 간단히 반복할 수 있다.

const numbers:number[] = [1,3,2,6]

for(const num of numbers) {
	console.log(num);
}