typescript
typescript copied to clipboard
[Grade School] Tests fail on a valid approach
The exercise expects the student to incorporate some mutability/modification guarantees. Object.freeze is one of the ways the goal can be achieved in javascript - it removes mutating methods like .push from the object you provide it. This is a reasonable approach. However, the test suite discourages its use by equating the runtime error to a test failure.