mirror of
https://github.com/hanzoai/prettier.git
synced 2026-09-24 17:02:04 +00:00
17 lines
308 B
JavaScript
17 lines
308 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'));
|
|
});
|
|
|
|
window.Data[key]("foo")
|
|
.then(() => a)
|
|
.catch(() => b);
|