我有三个列表-base, match, and replac
; match
和replac
的长度相同
base = ['abc', 'def', 'hjk']
match = ['abc', 'hjk']
replac = ['abcde', 'hjklm']
我想通过匹配base
中的字符串项来修改match
列表,并将其替换为replac
中的相同索引项。
预期输出:base = ['abcde', 'def', 'hjklm']
答案 0 :(得分:2)
这是我要怎么做:
function doGet() {
var html = HtmlService.createHtmlOutputFromFile('index');
return html.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}
function uploadFiles(data)
{
var file = data.myFile;
var name = data.name;
var mail = data.mail;
var folder = DriveApp.getFolderById('1lnLlX-zB8n4JZyEDdq242hiw2jX4qZWH');
DriveApp.createFolder(name);
DriveApp.createFile(mail, mail);
var createFile = folder.createFile(file);
return createFile.getUrl();
}