showing results for - "what is reveal js plugin"
Alonso
28 Oct 2016
1// toaster.js
2export default () => {
3  id: 'toaster',
4  init: ( deck ) => {
5    deck.addKeyBinding( { keyCode: 84, key: 'T' }, () => {
6      deck.shuffle();
7            console.log('beer');
8    } );
9  }
10}
Helena
23 Sep 2018
1ES6 Generator
2may be paused in the middle, one or many times, and resumed later, 
3allowing other code to run during these paused periods.
4If you've ever read anything about concurrency or threaded programming,
5 "cooperative", which basically indicates that a process (in our case, a function) itself 
6 chooses when it will allow an interruption, so that it can cooperate with other code. 
7 This concept is contrasted with "preemptive", 
8which suggests that a process/function could be interrupted against its will.
9ES6 generator functions are "cooperative" in their concurrency behavior. 
10Inside the generator function body, you use the new yield keyword to pause the function from inside itself. 
11Nothing can pause a generator from the outside; it pauses itself when it comes across a yield.
12
13However, once a generator has yield-paused itself, 
14it cannot resume on its own. 
15An external control must be used to restart the generator.