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 comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I think you just need the .replace(' ','') in the expression of the if statement. No need to make the computer do extra work there.
Does that mean mine could also be wrong, using your test? please verify to help me learn more.
wrong solution, this code would return False for a string "a a a aa dab wd qwudbhq wkjdb jkqwdbkdb 948djq9w84 d9*b84wqjd1b89 q4wkj89db jk8qwdj k8qwbd 8kj5qwbd8 q1wb9jkd 2q5w9jkdb 1qwjb8d 1469b19 89589" which is valid by description, because final string is shorter than 140 chars
not working:
let obj = {};
namespace(obj, 'first.second', 5);
namespace(obj, 'first.second');
//undefined
Care to elaborate? Which tests are wrong and why do you think they are wrong?
I am afraid your test cases are not ok. Returning values are not correct for some cases and we cannot even console.log for finding why.
Backwards Read Primes are primes that when read backwards [...] are a different prime. (This rules out primes which are palindromes.)
Expected: '[70001, 70009, 70061, 70079, 70121, 70141, 70163, 70241]', instead got: '[70001, 70009, 70061, 70079, 70121, 70141, 70163, 70207, 70241]'
Expected: '[70489, 70529, 70573, 70589]', instead got: '[70489, 70507, 70529, 70573, 70589]'
both my returns were correct, pls fix your test cases