Please refer to the link below, it has the question as well as the jsfiddle link:
LINK: dojo - Facing an error while trying to load ArcGIS drawtool bar code, gives parser error() - Geograp...