Shorthand Surge

EasyAcc. 99.1%
+20 XP 5

Streamlining Code

The starship's HUD is cluttered. To optimize processing, you must declare both energy cell variables on a single line.

You can declare multiple variables by separating them with a comma. Example: let x = 1, y = 2;

  1. Declare two variables a and b in a single line using let.
  2. Assign val1 to a and val2 to b.
  3. Return the sum a + b.

01EXAMPLE 1

Inputval1 = 5, val2 = 10
Output15

Explanation: Variables declared together on one line.

Constraints

  • Use a single let statement.
  • Return the sum as a number.
FundamentalsVariables
JavaScript
Loading...
9 Hidden

Input Arguments

val15
val210

Expected Output

15

Click RUN to test your solution