• +91 9723535972
  • info@interviewmaterial.com

RxJS Interview Questions and Answers

Question -
What are the advantages of Observable over Promise ?



Answer -

  • An Observable is like a Stream. It enables to pass zero or more events where the callback is called for each event.
  • Observable is preferred over Promise because it provides the features of Promise and more.
  • With Observable we can handle a single or multiple events.
  • Observable also has the advantage over Promise to be cancelable.
  • Observable allows lazy initialization.
  • Observable allows to format data
  • Observable provides operators like map, forEach, reduce etc

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners