Solved! Go to Solution.
The JavaScript API doesn't currently have built-in support for heat mapping however here's a link to a sample that shows how to create a heat map layer.
You can download the code from either github or arcgis.com.
https://github.com/driskull/ArcGIS-Heatmap-Layer--heatmap.js-
http://www.arcgis.com/home/item.html?id=3a6d8158252e4b96a8ecfb8b912df78d
Demo:
http://tmappsevents.esri.com/stage/heatmap/index.html
Note: If you need to support IE the heat map layer only works on IE9 and later.