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;
- Declare two variables
aandbin a single line usinglet. - Assign
val1toaandval2tob. - Return the sum
a + b.
01EXAMPLE 1
Input
val1 = 5, val2 = 10Output
15Explanation: Variables declared together on one line.
Constraints
- Use a single let statement.
- Return the sum as a number.
FundamentalsVariables
JavaScriptSystem handles I/O — write your function only
Loading...
9 Hidden
Input Arguments
val15
val210
Expected Output
15
Click RUN to test your solution