Factory functions

New keyword

Factory function

  • any function that returns a new object (just done manually)
createUser : function(username) {
      return {
          name: username
      }
}

Comments

Popular posts from this blog

A brief look into Cloudformation