Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Checking if the string length is odd is an obvious disqualifier that I didn't think to check for. Good call!
The elements of textArr are strings so it is redundant to wrap the affirmative ternary expression in a template literal.
Generating regex is the best use I have found for copilot & other language processors.
While troubleshooting my solution I switched from a ternary to the if/else statements but I think the ternary would be more readable in this case.