Skip to content

Instantly share code, notes, and snippets.

@romain130492
Last active February 29, 2020 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romain130492/5a27bb536e5eededb4bbe6c4d364bbac to your computer and use it in GitHub Desktop.
Save romain130492/5a27bb536e5eededb4bbe6c4d364bbac to your computer and use it in GitHub Desktop.
Computed property return statement
computed_property() {
      this.variable = new Date(this.currentUtc)
      return this.variable
    }
   const variable2 = this.computed_property()

OR more simply

computed_property() {
   return new Date(this.currentUtc)
 }
const variable2 = this.computed_property()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment