I think it has something to do with TIO not displaying the exact same text as the Japt Interpreter, so when copying and pasting between the two things got messed up
TIO is using v1.4.4 of Japt so there may be inconsistencies and features missing. You can access v1.4.4 of the interpreter here. But I suggest you use the v1.4.5 of the interpreter over TIO to give you access to the latest features.
Suggestion: new number functions (1) to determine if the given number n is of shape k (2) to calculate the nth k-gonal number (3) to generate an array of the first nk-gonal numbers.