Use of unresolved identifier 'session'


#1

Hello,

I am having a tough time figuring out how make the following error message go away : Use of unresolved identifier ‘session’.
This error message appears on the line that is identified between asterisk marks. This function is located in PhotoStore.swift file. Could anyone help me without making fun of me ?

func fetchRecentPhotos() {

let url = FlickrAPI.recentPhotosURL()
let request = NSURLRequest(url: url as URL)
**let task = session.dataTaskWithRequest(request) {**
    (data, response, error) -> Void in
    
    if let jsonData = data {
        if let jsonString = NSString(data: jsonData, encoding: NSUTF8StringEncoding) {
            print(jsonString)
        }
    }
    else if let requestError = error {
        print("Error fetching recent photos: \(requestError)")
    }
    else {
        print("Unexpected error with the request")
    }
}
task.resume()

}