0
입력 범위가 1 개 밖에없는 Google 스크립트 함수 중 일부를 최적화하는 데 성공했습니다.입력 값이 2 개 이상인 Google 스크립트 함수 최적화
1 개의 배열 (이름)과 2 개의 값 (날짜 및 학교 이름) 또는 3 개의 배열을 입력으로 사용하려고합니다. 코드의
:
// input - array of names like this 'Jon Snow'
// date - date with format like this '2017-12-28'
// school name like this 'School name'
function Allanswers(input, date, school) {
if (input.map) { // Test whether input is an array.
return input.map(function(x, date, school){ // Recurse over array if so.
return Allanswers(x, date, school)
});
} else {
return date; // returns 0
// the function is much more complicated but with this line I am checking if the value of date is taken from google spreadsheet
}
}