The below code computes area elevation relationship by iteration algorithm. But when the interval sets to 0.5 shows same area values in a row(like the below picture).
code link: https://code.earthengine.google.com/d6fea46bec579534464dc7e9d58e4290
Map.centerObject(geometry);
var dem = ee.Image("JAXA/ALOS/AW3D30/V2_2").clip(geometry).select('AVE_DSM');
Map.addLayer(dem,[],'DEM',false);
var demMin = ee.Number(dem.reduceRegion(ee.Reducer.min(), geometry, 250).get('AVE_DSM')).float();
var demMax = ee.Number(dem.reduceRegion(ee.Reducer.mean(), geometry, 250).get('AVE_DSM')).float();
print('minElevation:',demMin);
print('maxElevation:',demMax);
//////////////////////////////// area elevation
var interval = ee.Number(0.5);
var waterlevel = ee.List.sequence(demMin,demMax,interval);
var calcArea = function(level,list){
var inundated = dem.lte(ee.Number(level));
var area = inundated.multiply(30.0).multiply(30.0);
var totalarea = area.reduceRegion(ee.Reducer.sum(), geometry);
return ee.List(list).add(totalarea.get('AVE_DSM'));
};
var first = ee.List([]);
var AREA = ee.List(waterlevel.iterate(calcArea, first));
print('Area Estimated:',AREA)