// 示例中使用类, // 因为 JS 中没有接口class Printable { constructor() { throw new Error("Can't instantiate abstract class!"); } print(color) { throw new Error("Abstract method!"); }}let shape = new Printable(); //<- Errorconsole.log(shape);