Created
April 6, 2018 00:30
-
-
Save creaaa/23fa04fe8ec8f91048b84fca4fa12f02 to your computer and use it in GitHub Desktop.
知っとくと、助けられる場面が来るかも
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 見ての通り、arrayLiteral の個数は可変 | |
let x = Array<String>(arrayLiteral: "おとはす", "マリリ") // ["おとはす","マリリ"] | |
let y = Array<Int>(arrayLiteral: 1, 2, 3) // [1,2,3] | |
let z = Array<Int?>(arrayLiteral: nil) // [nil] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment