Chapter 8 - Observable.from pg.177

Hello, could anyone explain to me why in the book they use Observable.from([repo]) instead of Observable.of(repo). I mean, repo is just one String.

Thank you very much!

Oh that’s just a bit of designing ahead - in the challenges section you are supposed to get a list of repos and plug it in the existing code and it’s a little easier to solve the challenge if the existing code already assumes a list of URLs in there.

But you are right - if you just need the one, there is no point to use an array there :+1:t3:

1 Like

Thank you! :smiling_face_with_three_hearts:

This topic was automatically closed after 166 days. New replies are no longer allowed.