const source = Rx.Observable.range(1, 3)
.map((x, idx, obs) => `Element ${x} was at position ${idx}`);
const subscription = source.subscribe(
x => console.log(`Next: ${x}`),
err => console.log(`Error: ${err}`),
() => console.log(`Completed`)
);
// => Next: Element 1...