content_copyopen_in_new
import { of } from 'rxjs';
// Converts the arguments to an observable sequence.
of(10, 20, 30)
.subscribe(
next => console.log('next:', next),
err => console.log('error:', err),
() => console.log('the end'),
);
// Outputs
// next: 10
// next: 20
// next: 30
// the end
content_copyopen_in_new
import { of } from 'rxjs';
of({name:"asd"})
.subscribe({
next: value => console.log('next:', value),
error: err => console.log('error:', err),
complete: () => console.log('the end'),
});
// Outputs
// next: 10
// next: 20
// next: 30
// the end
Code Example |
---|
Javascript :: string to svg react |
:: javascript sleep one second |
:: bubbling and capturing in javascript |
:: |
Javascript :: moment date format |
:: how to give args type in nestjs graphql for array of input |
Javascript :: react js and graphql integration |
Javascript :: |
Javascript :: anagram javascript |
Javascript :: check install modules npm directory |
Javascript :: [Object: null prototype] appolo |
Javascript :: how to dynamically populate pdf with pdfmake node |
Javascript :: |
:: |
:: javascript dom after a element |
Javascript :: |
:: create window electron |
:: input element change event data |
:: |
Javascript :: connectedcallback web components |
Javascript :: |
Javascript :: iterate object in js |
:: |
:: |
:: |
Javascript :: what is form data in javascript |
:: javascript recursion |
:: nodejs cache data |
Javascript :: map react |
Javascript :: how to do something once in javascript |