70. implement Observable.from()

Is this helpful ?

from all members: - accepted / - tried

This is a follow-up on 57. create an Observable.

Suppose you have solved 57. create an Observable, here you are asked to implement a creation operator from().

From the document, from()

Creates an Observable from an Array, an array-like object, a Promise, an iterable object, or an Observable-like object.

Your from() should accept all above types.

// 1
// 2
// 3


  1. Observable is already given for you, no need to create it.
  2. for the problem here, Observable-like means Observable instance. Though in real-world you should check Symbol.observable

Let's try to solve this problem within 15 mintues.