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 solution is for old kata without parenthesis.
If you want to add methods to
Array.prototype
, make sure they are notenumerable
. ( Look upObject.defineProperty
on MDN. )Adding enumerable methods there is not good practice, and I don't blame a test suite for not specifically guarding against that. If you want to use that ( perfectly valid! ) JavaScript feature, do it correctly - or suffer the consequences.
It would really, really help if you post what language you're having this problem with, and ( properly marked up and spoilered ) your code. Help us help you!
Read smolen's and adityavkk's post below, maybe you're adding something to array prototype like them?
No, I didn't. I'd have to change the task to make expected output > input. And all current solutions would be invalid.
How do you mean? Expected output for 0 is -1.
I was having the same problem just use float() in covert stirng do not use int() side_not 8.0 ==8 True
Can an integer have multiple decimals in it? OFC not, so thats where it is coming from.