> For the complete documentation index, see [llms.txt](https://sekin.gitbook.io/myjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sekin.gitbook.io/myjs/class-zen-yang-yong-hao-lei/yong-lei-zhi-jie-chuang-jian-dui-xiang-guan-lian-dao-bian-liang.md).

# 用类直接创建对象关联到变量

经常是用类的实例，也就是 **new User() ;**&#x7136;而从没想过 只是 new User ,不调用。今天一看到这个 只new ,不调用觉得好奇怪。这样的结果会是什么。有什么用？从而想到， new 这个关键字到底是什么，从前是知道new 一个实例，是先创建一个对象，把函数里的this指向这个对象，并让函数返回这个对象。

原文地址：<https://juejin.im/post/584e1ac50ce463005c618ca2>
