📜  js结合类,有点...... - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:52.443000             🧑  作者: Mango

代码示例1
function newclasses(...classes) {
    class end {
        constructor() {
            classes.forEach((value) => {
                this[value.name] = new value();
            });
        }
    }
    return end;
}