Variable Declaration & Sum

Easy+10 XP

Mission Briefing

The Royal Mathematicians are attempting to calibrate the portal engine, but their manual calculations are too slow. They need an automated mechanism to fuse data points together.

The Concept: Data Storage

In JavaScript, a variable is a designated container in memory used to store data safely. We create variables using the let keyword for data that might change, or const for data that is permanent.

The Objective

Your function receives two numeric parameters, num1 and num2.

  1. Declare a new variable named total.
  2. Assign it the result of mathematically adding num1 and num2.
  3. Return your total variable to complete the calibration.

01EXAMPLE 1

Inputnum1 = 15, num2 = 25
Output40

Explanation: 15 + 25 = 40

02EXAMPLE 2

Inputnum1 = -5, num2 = 10
Output5

Explanation: -5 + 10 = 5

Constraints

  • Return the sum of the two parameters.
  • The return value must be a Number.
FundamentalsVariablesArithmetic
JavaScript
Loading...
3 Hidden

Input Arguments

num115
num225

Expected Output

40

Click RUN to test your solution