Skip to content

add multiply function#21

Open
rodrigoaltieri-bw wants to merge 1 commit intoedankwan:masterfrom
rodrigoaltieri-bw:feature/multiply
Open

add multiply function#21
rodrigoaltieri-bw wants to merge 1 commit intoedankwan:masterfrom
rodrigoaltieri-bw:feature/multiply

Conversation

@rodrigoaltieri-bw
Copy link
Copy Markdown

No description provided.

Comment thread dev/src/Jesus.js
};

Jesus.multiply = function(thing) {
if (typeof thing === 'fish') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it's missing a bread verification

@edankwan
Copy link
Copy Markdown
Owner

Using Array.fill can cause error on old browser. Jesus shouldn't break.

If we accept fish, we should also accept bread.

The multiplier should be higher. 5 loaves Of bread and 2 fish can feed 5,000. We shouldn't use random like way. We need to calculate the nutrition value of a loaf of bread and fish. With an estimation of how many adults and children among those 5,000 and make a proper guess.

Thought?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants