Created
February 15, 2021 06:19
-
-
Save Athira2199/e4340da99847e6830acff85dcd21cb10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const user = new User({ | |
name, | |
password | |
}) | |
await user.generatePassword() | |
/* we can write as many method functions in between as well*/ | |
await user.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment