Skip to content · ⁨본문 바로가기⁩

Arrow functions · ⁨화살표 함수⁩

English

Arrow functions

  • A shorter way to write a function: const square = (n) => n * n;.
  • With a single expression after =>, the value is returned automatically — no return, no { }.

한국어

화살표 함수

  • 함수를 더 짧게 쓰는 방법: const square = (n) => n * n;.
  • => 뒤에 단일 표현식이 있을 경우 값이 자동으로 반환되며, return이나 { }은 필요 없습니다.

두 가지 방식으로 작성된 동일한 함수: 긴 형식과 짧은 화살표 형식

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP