Course Content
Introduction to JavaScript
Challenge: Sum
Task
- Implement a function
sum
that takes 3 arguments (a
,b
, andc
) and returns the sum. - Call this function twice and save the results to the variables
sum1
andsum2
.
The output should be:
Arguments for the first calling 24
, 12
, and 32
.
Arguments for the second calling 12
, 42
, and 5
.
Hint
1. Use the
2. Use the function name to call this function.
3. Choose values yourself.
return
keyword inside the function body.
2. Use the function name to call this function.
3. Choose values yourself.
Section 6.
Chapter 6