So, new RXJS exercise:
Create two buttons like this:
const button1 = document.querySelector('#btn1');
const button2 = document.querySelector('#btn2');
After click on every button emit some value, but start doing this only, when user click both first and second button. When this rule is satisfied, emit last value.
Pokazywanie post贸w oznaczonych etykiet膮 rxjs. Poka偶 wszystkie posty
Pokazywanie post贸w oznaczonych etykiet膮 rxjs. Poka偶 wszystkie posty
niedziela, 30 czerwca 2019
Programming exercise #5 - Merge multiple observables (RXJS)
Today programming exercise:
You have two buttons on website like this:
<button id="btn1">Button1</button>
<button id="btn2">Button2</button>
Subscribe to click event on those two buttons and on every click, emit text "button 1" or "button 2". Use merge method, to create one observable from two.
You can also create two intervals, that emits some value, and merge them into one observable.
You have two buttons on website like this:
<button id="btn1">Button1</button>
<button id="btn2">Button2</button>
Subscribe to click event on those two buttons and on every click, emit text "button 1" or "button 2". Use merge method, to create one observable from two.
You can also create two intervals, that emits some value, and merge them into one observable.
艣roda, 1 maja 2019
Programming Exercise #4 - Observable from promise (RxJs)
Quick exercise Goal - Create an observable from Promise. After two seconds from start, this should log 'hello' message. I suggest you to use setTimeout() method.
sobota, 16 marca 2019
Programming exercise #3 - display elements from array with delay
In this exercise, I strong recommend using rxjs.
Input
Array of values (number of strings)
const arr = [1, 2, 3, 4, 5, 6];
Expected result
Display values from array with delay. For example output 1 => one second later output 2 => one second later output 3 etc
Subskrybuj:
Posty (Atom)