- [Woman] Now I'm showing you all my favorite operators,
which means I have to show you the map.
Remember when I said I wanted to access that value
so I could do something with it?
Well, here's the answer, map.
So far we have a simple interval that will send us
increasing numbers until it hits the take.
Now let's add a map operator.
Remember, we have to import it.
Let's move this take operator down here to the subscribe,
and put it on another line.
This is just so we can keep our code nice and neat.
And then we're going to add the map, right in here.
Of course, like any fat arrow, if we want to write something
more complex, we can just add the curly brackets
and move it to the next line.
In real life, you'll probably do something more complicated
but here, we're just illustrating how this operator will
let you modify the payload.
So we're going to keep it nice and simple.
We'll do map, and we'll take that payload,
and we're just going to multiply it by 10.
That's it, there you go.
Let's go check the browser and make sure
that each value has been multiplied by 10.
That's it.
Look how easy that was.
Now we can use that map operator to modify our value
in any way that we need to.