# 示例代码 class Animation { constructor(name, duration) { this.name = name; this.duration = duration; } play() { return `Playing ${this.name} for ${this.duration} seconds`; } }