Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit 7894776

Browse files
committed
Correct argument name and indentation in selectMany docs
Previously, the name of the argument being passed in to the selectMany with selector example was `count`, when it should have been `x`. The example was also improperly aligned. I have indented it to 4 spaces.
1 parent d2b68e1 commit 7894776

1 file changed

Lines changed: 16 additions & 14 deletions

File tree

doc/api/core/operators/selectmany.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,24 @@ var subscription = source.subscribe(
9393

9494
/* Using an array */
9595
Rx.Observable.of(2, 3, 5)
96-
.selectMany(function(outer) {
97-
//Return x^2, x^3 and x^4
98-
return [x * x,
99-
x * x * x,
100-
x * x * x * x];
101-
},
102-
function(outer, inner, outerIndex, innerIndex)
103-
{
104-
return { outer : outer, inner : inner, outerIdx : outerIndex, innerIdx : innerIndex };
105-
}
96+
.selectMany(function(x) {
97+
// Return x^2, x^3 and x^4
98+
return [
99+
x * x,
100+
x * x * x,
101+
x * x * x * x
102+
];
103+
},
104+
function(outer, inner, outerIndex, innerIndex) {
105+
return { outer : outer, inner : inner, outerIdx : outerIndex, innerIdx : innerIndex };
106+
}
106107
).subscribe(function(next) {
107-
108-
console.log('Outer: ' + next.outer + ', Inner: ' + next.inner, +
109-
', InnerIndex: ' + next.innerIdx + ', OuterIndex: ' + next.outerIdx);
108+
console.log(
109+
'Outer: ' + next.outer + ', Inner: ' + next.inner, +
110+
', InnerIndex: ' + next.innerIdx + ', OuterIndex: ' + next.outerIdx
111+
);
110112
}, function() {
111-
console.log('Completed');
113+
console.log('Completed');
112114
});
113115

114116
//=> Outer: 2, Inner: 4, InnerIndex : 0, OuterIndex : 0

0 commit comments

Comments
 (0)