[GIS] Convert list of number to list of strings in Google Earth Engine

google-earth-enginegoogle-earth-engine-javascript-api

Is it possible to convert a list of numbers to a list of string in Google Earth Engine? I'd like to take something that looks like this

var lis = ee.List([27141, 20043]);

and convert it to something that looks like this

var lis = ee.List(['27141', '20043']);

I imagine this is really simple but I can't find a solution in GEE documentation.

Best Answer

Any time you want to compute something from each element of a list you can map over it:

print(lis.map(function (number) { return ee.String(number); }));
Related Question