Message from JavaScript discussions

April 2019

— Yeah... lol

— 

manage(actions, duration) {
this.pause();
if (actions.length === 0) {
this.play(() =>
console.error('there was no function called'));
} else {
this.play(...actions.slice(0, 3));
}
setTimeout(
() => this.resume(),
duration);
}

— That will behave exactly the same as yours

— Oh shut, mind blown

— In fact...

— 

manage(actions, duration) {
this.pause();
this.play(
...actions.length === 0
? [
() =>
console.error('no function was called')
]
: actions.slice(0, 3));
setTimeout(
() => this.resume(),
duration);
}

Message permanent page

— This might be a bit abstract tho

— ??

— No, I understand it

— Still does the exact same thing

— I actually thought you were going to include that

— ?