上QQ阅读APP看书,第一时间看更新
Exercise
Create a class level method in our Item model that can generate and return fake Shopping List Items. This method will take one argument, which will be the number of fake items to create and return. You can give your items random names or append the item name with a counter. You can also mark your items checked or unchecked if you like. The following is the method that you need to fill out by adding your code inside the function block:
static func fake(_ count: Int) -> [Item] {
// Your code goes here
}