On the page Collatz Conjecture in JavaScript on Exercism
In JavaScript, this can be done using the
throwstatement.
throw new Error('Only positivenumbersare allowed');
test expect
.toThrow(new Error(‘Only positive integers are allowed’));
On the page Collatz Conjecture in JavaScript on Exercism
In JavaScript, this can be done using the
throwstatement.
throw new Error('Only positivenumbersare allowed');
test expect
.toThrow(new Error(‘Only positive integers are allowed’));
The proposed edit is within the track-specific instructions append so @SleeplessByte and @Cool-Katt as the JavaScript track maintainers can take it from here.
The line in question is
Done. Here it is :