Skip to content

Instantly share code, notes, and snippets.

@rayblair06
Forked from mul14/index.js
Created March 25, 2024 13:10
Show Gist options
  • Save rayblair06/e73337911223a0f6be66a76b64ce1753 to your computer and use it in GitHub Desktop.
Save rayblair06/e73337911223a0f6be66a76b64ce1753 to your computer and use it in GitHub Desktop.

Revisions

  1. @mul14 mul14 created this gist Jul 25, 2018.
    22 changes: 22 additions & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    /**
    * 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,
    }
    }