Skip to content

Instantly share code, notes, and snippets.

@mklabs
Created November 1, 2010 18:07
Show Gist options
  • Select an option

  • Save mklabs/658625 to your computer and use it in GitHub Desktop.

Select an option

Save mklabs/658625 to your computer and use it in GitHub Desktop.
var newArray = dojo.map(menuItems, function(item) {
var ret = item.name;
if (item.extras && item.extras.length) {
ret += '(' + item.extras.join(', ') + ')';
}
return ret;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment