Code2
var map;
require(["esri/map", "esri/layers/ArcGISTiledMapServiceLayer", "dojo/domReady!"], function(Map, Tiled) {
map = new Map("map");
var tiled = new Tiled(http://maps.six.nsw.gov.au/arcgis/rest/services/public/NSW_Imagery/MapServer);
map.addLayer(tiled);
});