I have a simple code to call a value from another function and its not working :
function ABC() {
var ID = XYZ(id);
Logger.log(ID); //throws error not defined.
}
function XYZ(id) {
var id = "1234"
return id;
}
Run Code Online (Sandbox Code Playgroud)
What I wan to do is capture the value of id from function XYZ and Logger.log it into function ABC. But this reflects error.
我有一个数组说
arr1 = [[1,2,3,4],[5,6,7,8],[9,10,11,12]]
Run Code Online (Sandbox Code Playgroud)
我想将其切片并选择第二列和第三列。
我尝试过使用切片,但没有成功。
var result = arr1.slice(1,3);
但我没有得到想要的输出
[[2,3],[6,7],[10,11]]
Run Code Online (Sandbox Code Playgroud)
是因为我使用 Google 电子表格收集数据吗?