After Updating
EasyAcc. 92.4%
+20 XP 5
Counting Queues
When increasing variables smoothly, the Postfix Increment (++) symbol increments numbers safely. But notably, it returns the number as it existed right before going up.
The Assignment
Let's see postfix happen precisely.
- Assign
count++directly to a newly scoped variablenewCount. - Make an array putting both back in:
[newCount, count]and return securely.
01EXAMPLE 1
Input
count = 5Output
[5, 6]Explanation: Returns current 5 immediately, then shifts count to 6.
Constraints
- Use postfix ++.
- Original variable is expected updated inside logic.
FundamentalsMathOperators
JavaScriptSystem handles I/O — write your function only
Loading...
5 Hidden
Input Arguments
count5
Expected Output
[5,6]
Click RUN to test your solution