Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sally McGrath | Structuring and Testing Data 2 Workshop | My prediction for exercise 1 #259

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion js1-week-2/0.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,11 @@ b) What will `result2` evaluate to? Explain your answer
c) Try to summarise the main difference between `logSum` and `calculateSum`


{YOUR ANSWERS HERE}
The function calculateSum takes two arguments and returns the value of those arguments added together (summed)

a) the sum of the two parameters is stored in result1 evaluate to 42

b) result2 will log out the sum but doesn't return a value - we're not sure what it will return
undefined

c) Summarise the main differences : 1 returns a sum, 2 writes to the console