Lesson 6: Scanning drafts in Gmail using Google Apps script

function updateAllDrafts(){
var drafts = GmailApp.getDrafts();
Logger.log(drafts.length);
for (var x=0;x<drafts.length;x++){
Logger.log(drafts[x].getMessage().getBody());
}
}