-
-
Save rayblair06/e73337911223a0f6be66a76b64ce1753 to your computer and use it in GitHub Desktop.
JavaScript DocBlock Cheat Sheet
This file contains hidden or 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
| /** | |
| * Description of this function. | |
| * | |
| * @param {string} name | |
| * @param {Date} birthday | |
| * @param {boolean=} isMarried Optional parameter. | |
| * @param {string|null} [bloodType] | |
| * @param {number=} [weight=0] Optional parameter with default value. | |
| * @param {string[]} favoriteFoods Array of String. | |
| * | |
| * @returns {Object} | |
| */ | |
| function Person(name, birthday, isMarried, bloodType = null, weight = 0, favoriteFoods = []) { | |
| return { | |
| name, | |
| birthday, | |
| weight, | |
| bloodType, | |
| isMarried, | |
| favoriteFoods, | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment