AnsweredAssumed Answered

Please explain for me this code ^^

Question asked by patricknguyen178 on Nov 4, 2013
Latest reply on Nov 5, 2013 by patricknguyen178
Hi everybody,

I'm doing this tutorial about Drawing Tools

https://developers.arcgis.com/en/javascript/jssamples/toolbar_draw.html

But I can't understand what this code will do

function activateTool() {                   var tool = this.label.toUpperCase().replace(/ /g, "_"); //please explain this for me                   toolbar.activate(Draw[tool]); // and this one why put tool in [] ? is it an array ?                    map.hideZoomSlider();               }


Best Regards,

Phuong Nguyen

Outcomes