Created
March 15, 2015 02:03
-
-
Save mlvea/dd7fd837bde3ce98c17a to your computer and use it in GitHub Desktop.
Arrays in swift
This file contains hidden or 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
//My favourite movies | |
var favouriteMovies = ["Inception","Theory of Everything","Fifty Shades of Grey"] | |
//I have new favourite | |
favouriteMovies += "PK" | |
//Ohh forgot The Hunger Games | |
favouriteMovies += ["Hunger Games","Catching Fire","Mocking Jay"] | |
//Hmm. Replace Fifty Shades and PK with new favourites I happened to watch recently -> Interstellar and The Social Network | |
favouriteMovies[2...3] = ["Instersteller","The Social Network"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment