Help me understand this code, how output of of (1,2,3) is piped to map( x => x*x) though map( x => x*x) is sequenced 1st in code line and of (1,2,3) is sequenced 2nd
map(x => x*x) (of (1,2,3)).subscribe((value)=> console.log(`value : ${value}`))
same can be written as below, that I understand well, but not above one..
of(1,2,3).pipe(map(x => x*x)).subscribe((value)=> console.log(`value : ${value}`))
FYI, both are correct, and return value 1,4,9
in case you are trying same in editor, include below imports
import {of} from 'rxjs'
import {map} from 'rxjs/operators'