Edit in JSFiddle

var map;
require([
  "esri/map",
  "esri/layers/ArcGISDynamicMapServiceLayer",
  "esri/layers/ImageParameters"
], function(Map, ArcGISDynamicMapServiceLayer, ImageParameters) {

  map = new Map("mapDiv", {
    basemap: "topo",
    sliderOrientation: "horizontal",
    center: [8.47, 60.70],
    zoom: 8
  });

  var imageParameters = new ImageParameters();
  imageParameters.layerIds = [4, 14];
  imageParameters.layerOption = ImageParameters.LAYER_OPTION_SHOW;

  var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("https://gis3.nve.no/map/rest/services/Bre/MapServer", {
    "imageParameters": imageParameters
  });

  map.addLayer(dynamicMapServiceLayer);
});
<div id="mapDiv"></div>
html,
body,
#mapDiv {
  padding: 0;
  margin: 0;
  height: 100%;
}

External resources loaded into this fiddle: