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.
I think the order is inverted. It should be oldest = curr.age;
not sure why this one is considered "best practice"...the code will give wrong results
phew, I thought it was me until I read the comments
Maybe sometime tests were bad then his solution could pass
How is this even working??
Tried with::
let list = [ {age: 49}, {age: 55}, {age: 19}, {age: 60}, {age:19}, {age:60}]
Gave me::
[ { age: 49 }, { age: 49 }, { age: 49 }, { age: 49 } ]
Please help me understand. Thanks
Yes I've had this issue too. I haven't used any for or while loops, only if and else if statements and all the tests have passed, apart from the one error message saying that I've used restricted stuff. So what else is restricted besides for and while loops? It's not clear from the instructions.
Without code, this issue is impossible to resolve ... .
not an issue.
I am, I think the author is appending a new line character before making sure that the asterisks are aligned
I might have found a solution, see my issue above!
This could be related to
@MikeHathaway
's comment below, but my case is a little bit different. I don't get the"u r using restricted stuff"
error message but i do have500
/501
tests passing.After looking closer at the failing test, I realised that the issue is with the tests themselves:
This is the second sample test
The third basic test for the attempt-suite fails as well.
Negative numbers aren't prime. The expected results of these tests should therefore be
false
.In addition to that, the instructions has an invalid example with a negative number as well. It's a good idea to test with negative numbers - but only if the test cases have correct assertions.
Could you show your code for reference? :)
I've implented a recursive solution using a helper function that passes 500 of 501 tests, but is failing on 'u r using restricted stuff'. There is no for, or while loop anywhere in my code. I did make use of default parameters and modulo operators.
What exactly besides loops is restricted? Has anyone else had this problem?
WTF?
This doesn't work if the ages increase each time in the array of objects
Loading more items...