class Task {
constructor(name) {
this.name = name;
}
async execute() {
const result = await Promise.resolve(this.name);
return { result };
}
}
const task = new Task('test');
task.execute().then(console.log); Post #2156
5.62K
CHALLENGE
- 🔥 7
- 👍 2
- ❤ 1