function createNewFolderInGoogleDrive(folderName) {
return DriveApp.createFolder(folderName);
}
Use function createNewFolderInGoogleDrive
to create folder named Test folder
in a Google Drive root:
var newFolder = createNewFolderInGoogleDrive('Test folder');
newFolder
has Class Folder type:
// output id of new folder to log
Logger.log(newFolder.getId());