Skip to content

Commit

Permalink
Merge pull request #18287 from mukilane/ember-array-seteach-doc
Browse files Browse the repository at this point in the history
[DOC] Added example for EmberArray#setEach
  • Loading branch information
locks authored Aug 20, 2019
2 parents 75c707d + 938b76c commit ac0e115
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/@ember/-internals/runtime/lib/mixins/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,13 @@ const ArrayMixin = Mixin.create(Enumerable, {
implements Observable, the value will be changed to `set(),` otherwise
it will be set directly. `null` objects are skipped.
```javascript
let people = [{name: 'Joe'}, {name: 'Matt'}];
people.setEach('zipCode', '10011);
// [{name: 'Joe', zipCode: '10011'}, {name: 'Matt', zipCode: '10011'}];
```
@method setEach
@param {String} key The key to set
@param {Object} value The object to set
Expand Down

0 comments on commit ac0e115

Please sign in to comment.