Issue Overview
The function getNextId always return the number 1, independent of the array given. Shouldn't the function return the biggest id plus 1? I fixed the issue by switching max and x.id in the conditional.
Describe your environment
Typescript Version 4.7.4
node.js v16.16.0
Steps to Reproduce
- Run the program.
- The property id is 1 instead of 4 of the next todo item.
Expected Behavior
The property id from the next todo item should be 4.
Current Behavior
The id is 1.
Possible Solution
Switch max and x.id in the conditional.