What is wrong with this code i want calculate ndvi from s2 in google earth engine?


var image=ee.ImageCollection(‘COPERNICUS/S2’)
.filterDate(‘2016-12-31’, ‘2017-12-31’);
var ndvi = image.normalizedDifference([‘B8’, ‘B4’]);

Map.addLayer(ndvi,imageVisParam, ‘ndvi’);


This question is not related to SNAP or the S2TBX. I guess this is Google Earth Engine. You should ask the question in their forum. You will get better answers.