Prefix Increment

EasyAcc. 94.8%
+20 XP 5

Priority Updates

The Prefix Increment (++count) adds 1 to the variable and returns the newly updated value immediately.

  1. Assign ++points to a variable named bonusPoints.
  2. Return both values in an array: [bonusPoints, points].

01EXAMPLE 1

Inputpoints = 10
Output[11, 11]

Explanation: Updates then returns the result.

Constraints

  • Use prefix ++.
  • Both values in result must be equal.
FundamentalsMathOperators
JavaScript
Loading...
9 Hidden

Input Arguments

points10

Expected Output

[11,11]

Click RUN to test your solution