Unable to get Courses from Garmin device

Hello, I've tried getting the courses from the device but the problem lies here, 

var iterator = PersistedContent.getCourses();
 
I am unable to get any course from the device kindly help..