首先来看一下我们的list
ee.List(list)
Constructs a new list.
Arguments:
list (List<Object>|Object):
A list or a computed object.
Returns: List
//javascript
var aList = [1,2,3];
print(aList.length);
//GEE
var bList = ee.List([1,2,3]);
print(bList.length());
其实本质的结果还是一样的额,但是有些东西是不同的,因为GEE中的对象,需要前面加入EE.才可以进行统计,特别是在很多计算,当你取打印两者的而对象类型就是发现区别。
//javaScript
var aList = [1,2,3];
aList.push(4);
print("aList", aList);
//gee
var bList = ee.List([1,2,3]);
bList = bList.add(4);
print("bList", bList);