mirror of
https://github.com/swc-project/swc.git
synced 2024-12-30 17:15:11 +03:00
13 lines
163 B
JavaScript
13 lines
163 B
JavaScript
|
const keys = {
|
||
|
a: 1,
|
||
|
b: 2,
|
||
|
}
|
||
|
|
||
|
const controller = {}
|
||
|
|
||
|
for (const key in keys) {
|
||
|
controller[key] = (c, ...d) => {
|
||
|
console.log(keys[key])
|
||
|
}
|
||
|
}
|