Robert,
your code didn't work because I don't have three layers, I have published ONE mapService that contains three layers, it's giving me "TypeError: Cannot read property 'layerObject' of undefined"
because that is my "lyrInfoArr" variable:
I have tried also:
var layerInfos = LayerInfos.getInstanceSync();
var lyrInfoArr = layerInfos.getLayerInfoArray();
var layerLayer=lyrInfoArr[0].layerObject.layerInfos;
this.map.removeLayer(layerLayer[0]);
this.map.removeLayer(layerLayer[1]);
this.map.removeLayer(layerLayer[2]);
But this code does nothing .