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.
This was a bad idea, if the password is 'false' for some reason, then putting a \ or | in the password guess will cause a success to be returned from the #login method.
This solution is very similar to mine, but you could have left out the {1} because using the ^ and the $ already checks to see if the digit is both the first and last character.
When you have a situation where the condition is the same as the truthy expression in a ternary, you can reduce this to just use an ||(or) statement.
e.g. return data[language] || 'Welcome';
This works because if the first expression is truthy, then the operation short circuits and the first expression is returned. If the first expression falsy and the second statement is truthy, the second statement gets returned. In the case where both expressions are falsy, this will return false. The last scenario won't happen in this case because your second expression is a constant truthy value.
Array#slice(https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) can take an optional 'end' parameter.
You could do something like the following which will allow you to omit the arr.pop() operation:
arr = arr.slice(1, arr.length -1);
Just from looking at the commented out code, it looks like you didn't actually call the reverse function, you would have to add the parenthesis in order to call it, e.g. list.reverse()