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.
OP solved it, closing
OP solved it, closing
OP solved it, closing
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
OP solved it, closing
Start by commenting out lines from bottom to top, and make sure each step really does what the comment says.
perhaps this can help: js for loop
The center portion of the for loop should compare that
i
persists in being less than thearrayLength
.Stuck how? What language?
That's because your loop won't run when
a > b
.Ternary operator. It's similar to if/else. Below Christos Maris wrote about it.
But it shows you haven't solved it yet :/
Ok, I'll tell you, but you should try to fix such problems on your own. Math.pow() returns a
double
, not an integer, but you're trying assign its result to integer variable (int result = 3.14 -> error), so you need to convert the result to integer before it's assigned. So, just add the cast before pow. Is it clearer now?Loading more items...