简体   繁体   English

VS JS编辑器中“函数”和括号之间的空间

[英]Space between “function” and parenthesis in VS JS editor

Why does Visual Studio JavaScript editor put a space between the "function" keyword and its following parenthesis ? 为什么Visual Studio JavaScript编辑器在“ function”关键字及其后面的括号之间放置一个空格?

function foo () { } 函数foo(){}

Is that some kind of cool convention ? 那是一种很酷的约定吗?

It is a stylistic convention in Visual Studio. 这是Visual Studio中的一种样式约定。 In the past you could not change it, but you might find now you can: "Options -> Text Editor -> JScript -> Formatting" 过去您无法更改它,但是现在您可以找到:“选项->文本编辑器-> JScript->格式设置”

Most refer the lack of space to Douglas Crockford's javascript style guide 大多数人将缺乏空间的想法提到道格拉斯·克罗福德(Douglas Crockford)的javascript样式指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM