SyntaxFix
Write A Post
Hire A Developer
Questions
Well, you can declare variables inside the Constructor.
class Foo { constructor() { var name = "foo" this.method = function() { return name } } } var foo = new Foo() foo.method()