Ember.js: Use of invoke() instead of forEach()
Did you know?
array.forEach(function(element) {
element.doSomething(arg1, arg2);
});
Is equivalent to...
array.invoke('doSomething', arg1, arg2);
Much nicer :-)
http://emberjs.com/api/classes/Ember.Enumerable.html#method_invoke
Written by Keith Broughton
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Emberjs
Authors
Related Tags
#emberjs
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#