Showing posts with label Arrow Function. Show all posts
Showing posts with label Arrow Function. Show all posts

Sunday, August 23, 2020

Creating observable using Inline Arrow functions

In the previous post we created a separate function and passed it as a parameter to create an Observable. In this post we shall see on how to create an Observable using an inline arrow function.
In the below example we will create an Observable with an inline function which emits the current time, we use setInterval to emit a new value every 1 second.