13 lines
247 B
JavaScript
13 lines
247 B
JavaScript
![]() |
[].forEach(key => {
|
||
|
data[key]('foo')
|
||
|
.then(() => console.log('bar'))
|
||
|
.catch(() => console.log('baz'));
|
||
|
});
|
||
|
|
||
|
[].forEach(key => {
|
||
|
data('foo')
|
||
|
[key]('bar')
|
||
|
.then(() => console.log('bar'))
|
||
|
.catch(() => console.log('baz'));
|
||
|
});
|