Skip to content

Instantly share code, notes, and snippets.

@mbjelac
Last active March 1, 2019 08:41
Show Gist options
  • Select an option

  • Save mbjelac/0910475d9064595fac97cd7cee7ef1e5 to your computer and use it in GitHub Desktop.

Select an option

Save mbjelac/0910475d9064595fac97cd7cee7ef1e5 to your computer and use it in GitHub Desktop.
Comment type: User manual
/*
Carrot Soup Factory
===================
This creates carrot soup. (Go figure!)
## API
Parameters:
amountOfCarrots: number - the amount of carrots
amountOfOnions: number - the amount of onions
amountOfSalt: number - the amount of salt in pinches
Returns: object - a pot of carrot soup; object members:
amount: number - liters
temperature: number - celcius
carrotSlices: number - amount of carrot slices
saltiness: string - enum value of: BLAND, MILD, MEDIUM, STRONG, INEDIBLE
tastiness: boolean - a flag indicating whether the soup is tasty or not
## Usage tips (TL;DR)
The more carrots you put in, the more carrot slices you will have in the soup.
The same goes for the salt.
Tastiness depends on the overall combination of the amount of carrots, onions and salt.
## The art & science of a tasty carrot soup
... imagine an an essay on how to make a delicious carrot soup here ...
*/
function createCarrotSoup(amountOfCarrots, amountOfOnions, amountOfSalt) {
// ... implementation ...
}
@mbjelac

mbjelac commented Mar 1, 2019

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment