Skip to content

Instantly share code, notes, and snippets.

@easierbycode
Created April 29, 2016 18:46
Show Gist options
  • Save easierbycode/77568ed1be03fa809b4528083b007b58 to your computer and use it in GitHub Desktop.
Save easierbycode/77568ed1be03fa809b4528083b007b58 to your computer and use it in GitHub Desktop.
static is an ES6 keyword used to attach methods to a class
class Project {
static getDefaultId() {
return 1;
}
}
Project.getDefaultId();
// 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment