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.
Yes Of Course it can simply work without classes. Just write the function outside of the class code block literal and invoke the function like this: findSmallestInt([23, 45, 67])
Good
what if num = 0
the return will -0
your solution not suitable
if number already negative then returning will be positive - * - = +
This comment is hidden because it contains spoiler information about the solution
Yes, it works this way, and your answer would be 7. But it's not what the kata asks.
Wouldn't it be 7? -7 * -1 = 7. Or it doesn't work this way?
What if the input was
-7
?Hi. Could someone please explain to me why isn't it possible just to write an expression
return num * -1 ?
It doesn't work in JavaScript this way?
works.
.
Is that so?
same here lol
interesting
it's great , but doesnot work with 0 .
Loading more items...