전체 글 (162) 썸네일형 리스트형 타입: Structures (구조체) and Classes (클래스) vs. Enumerations (열거형) 중요 개념: 타입/ 인스턴스/ 프로퍼티/ 메서드 A type = a blueprint An instance = a house (you built from the blueprint) 블루프린트는 각 집의 features 특징과 behaviors 행동을 보여줌. Features -> properties Behaviors -> methods e.g. 지하철 매표 자판기 Features (= properties) 색깔 크기 Behaviors (= methods) 돈 출력 표 출력 블루프린트는 각 집의 features (프로퍼티)와 behavior (메서드)를 보여줌. In a type, features are called properties And behaviors are called methods. Prope.. 야곰 스위프트 기초 퀴즈 - 데이터 타입 let numberOne: Int = 123 let numberTwo: Double = 123 let numberThree: UInt = -123 Negative integer '-123' overflows when stored into unsigned type 'UInt' let character: Character = 'A' Single-quoted string literal found, use '"' let string: String = "A" var arrayOne: Array = [1,2,3] var arrayTwo: [Int] = Array() var arrayThree:[Int] = [Int] Cannot convert value of type '[Int].Type' to specified .. continue vs. return vs. break Continue The continue statement tells a loop to stop what it’s doing and start again at the beginning of the next iteration through the loop. It says “I am done with the current loop iteration” without leaving the loop altogether. if문 조건에 안 맞는다고 해서 for문을 아예 나가버리는 것이 아님. 그러니 다시 다음 조건문 케이스 실행하는 것. The following example removes all vowels and spaces from a lowercase string to create a cryptic puzzl.. 이전 1 2 3 4 ··· 54 다음