Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Javascript 函数可以返回对象或未定义。我正在考虑采用始终返回调用函数的对象的策略,除非需要一些其他值以促进方法链接。即使在编写函数时没有感知到需要链接的情况下,默认情况下是否存在与此相关的开销?