Sobes.tech
Junior — Senior

Bulk image upload function

livecode

Task condition

Create a function that allows sequential loading of a set of images. Example usage: a loop that is called a hundred times, passing the current index to the loading function. After all requests are completed, display the message "Done".

import Foundation

for idx in 0..<100 {
    fetchImage(at: idx)
}

print("Done")

func fetchImage(at idx: Int) {
    // Request to fetch the image
}