Your challenge is to add this code to the end of your project and implement the TOODs:
NSMutableArray *favoriteFood = [NSMutableArray
arrayWithObjects:@"Pizza", @"Sushi", @"Toe Jam", @"Yellow Snow", nil];
// TODO 1: Convert to use literal syntax
// TODO 2: Remove any non-favorite food
// TODO 3: Add at least 1 new favorite food
// TODO 4: Iterate through list and print out each item (use for loop and literal syntax)
At 12:45, when discussing literal syntax, I say “and you don’t have to put nil”. For clarifiation, it’s an error if you *do* put nil. It won’t compile if you put plain nil, and if you try casting nil to a type, it will compile but crash at runtime.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.