I have the following function:
function getMeasurementEventProperties() {
changedMeasurements.push("none");
finalMeasurements = [...new Set(changedMeasurements)];
if (finalMeasurements.length > 1) {
var finalMeasurements = finalMeasurements.filter(function (measurement) {
return measurement !== 'none'
});
return finalMeasurements.join(",").replace(/,/g, ', ')
}
return finalMeasurements.join(",").replace(/,/g, ', ')
}
However they are failing unit tests (in Internet Explorer only) saying that there is a syntax error on line finalMeasurements = [...new Set(changedMeasurements)];
- is this not supported by IE? Or have I got the syntax incorrect here?