I am trying to do same job for two different events on map using dojo on() function.
map.on('extent-change', function (event) {
//code goes here
}
and
map.on('zoom-end', function () {
//same code goes here
}
Is there any way that I could attach the events or do the same thing for both without writing the code again?