Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Sum | Functions
Introduction to JavaScript

Challenge: SumChallenge: Sum

Task

  1. Implement a function sum that takes 3 arguments (a, b, and c) and returns the sum.
  2. Call this function twice and save the results to the variables sum1 and sum2.

The output should be:

Use arguments 24, 12, and 32 for the first function call.

Use arguments 12, 42, and 5 for the second function call.

  1. Use the return keyword inside the function body.
  2. Use the function name to call this function.
  3. Choose values yourself.

Tudo estava claro?

Seção 6. Capítulo 6
course content

Conteúdo do Curso

Introduction to JavaScript

Challenge: SumChallenge: Sum

Task

  1. Implement a function sum that takes 3 arguments (a, b, and c) and returns the sum.
  2. Call this function twice and save the results to the variables sum1 and sum2.

The output should be:

Use arguments 24, 12, and 32 for the first function call.

Use arguments 12, 42, and 5 for the second function call.

  1. Use the return keyword inside the function body.
  2. Use the function name to call this function.
  3. Choose values yourself.

Tudo estava claro?

Seção 6. Capítulo 6
some-alt