Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add support for concise methods #955

Closed
rwaldron opened this Issue · 3 comments

2 participants

@rwaldron
Owner
let o = {
  foo() {
    return "no 'function' needed";
  }
};

console.log( o.foo() ); // "no 'function' needed"
@guyzmo

is it part of es6 draft?

@rwaldron
Owner

Yes, 13.3 of ES6-draft, but here is the syntax definition:

MethodDefinition :
    PropertyName ( FormalParameterList ) { FunctionBody }
    * PropertyName  ( FormalParameterList ) { FunctionBody }

(Can be a generator as well)

@guyzmo

ok, done

@valueof valueof closed this in 8c1cf12
@jugglinmike jugglinmike referenced this issue from a commit in jugglinmike/jshint
@guyzmo guyzmo Added support for concise methods declaration in objects.
Closes GH-975.
Closes GH-955.
96682c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.