Javascript, pass type as parameter in functions
<p>I am currently learning Javascript and I noticed something that, to me, doesn't make much sense. </p>

<p>In an example on the ArcGIS website, there is this piece of code</p>

<pre><code>var map
require(["esri/map", "dojo/domReady!"], function(Map) {
  map = new Map("mapDiv", {
    center: [-56.049, 38.485],
    zoom: 3,
    basemap: "streets"
  });
});
</code></pre>

<p>I don't get how you can do "new Map" when Map is the parameter of function(Map). To be able to use new, then Map must be a type and I haven't seen a type being a parameter in other languages. </p>