Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javascript 中关于空行的规范 #19

Open
lovanya opened this issue Sep 21, 2018 · 0 comments
Open

javascript 中关于空行的规范 #19

lovanya opened this issue Sep 21, 2018 · 0 comments

Comments

@lovanya
Copy link

lovanya commented Sep 21, 2018

   // need blank line after blocks
   var obj = {
        foo: function() {
            return 1;
        },

        bar: function() {
            return 2;
        }
    };

   // not need blank line when in argument list, array, object
    var foo = {
        a: 2,
        b: function() {
            a++;
        },
        c: 3
    };

为什么第一个obj.foo 后面加空行,第二个foo.b后面又没有?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant