Skip to content

javascript 中关于空行的规范 #19

Description

@lovanya
   // 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后面又没有?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions