Replies: 1 comment 1 reply
-
문법이 헷갈리시는 분들을 이 쪽으로 안내하면 좋겠네요 ㅎ _ㅎ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
공식문서
프로그래밍의 기본 원리
모든 프로그래밍은 순차, 조건, 반복 (+데이터) 세가지 논리로 이루어 진다.
조건문 (if)
조건에 따라 코드를 분리하는 것을 분기 처리한다 라고도 한다.
조건문 (switch)
fallthrough
키워드를 사용한다.switch 문의 패턴 매칭
switch 문의 응용 - where 조건
조건문 (guard)
사용하는 이유
반복문 (for)
for 문에서 사용하는 임시 상수
let item: Int = 1
...let item: Int = 5
→ 각 주기마다 반복된다
for 문에서 선언하는 변수는 for 문 내에서만 사용가능 (scope)
와일드카드 패턴
for 문에서 역순으로 돌기
반복문 (while)
반복문 (repeat-while)
제어전송문
continue
break
fallthrough
return
throw
for문과 while 문 비교
for문과 while 문
제어전송문
제어전송문
Beta Was this translation helpful? Give feedback.
All reactions