作用域的作用??求个通俗点的例子关于singleton和prototype区别
收起
prototype 是每次访问拿到一个实例,比如说new Date();这种方式
singleton 是全局共享一个实例,比如Calender.getInstance();这种方式
报告相同问题?