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.
poor explanation to the good task.
nope, the array returns the number of index the should choose the specific character in the hardcoded string. For instance, let's look at (~~(85/10))
85 / 10 = 8.5
~8.5 = -9 (rounding 8 to nine and giving minus ahead of it)
~(-9) = 8 (-9 + 1 and giving the opposite sign)
Finally we got 8, so 'DDDDDDCCBAS'[8] = 'B'
Hi!
Try please this: else if (isNaN(n)) and as the output: "Input number is Number.NaN" You have something like: "Input number is Number.Nan".
OP solved it, closing
Nothing can be enforced since this is a beginner-level kata
This comment is hidden because it contains spoiler information about the solution
TypeScript translation is ready. Please check and approve
This comment is hidden because it contains spoiler information about the solution
Because test suite calls your function without parameters, like this:
let result = hello();
This comment is hidden because it contains spoiler information about the solution
s += tmp
is short fors = s + tmp
. So,s + tmp
is literally saved tos
for every iteration of the loop. This expression is not "inside a function call". The result of the evaluated expression (s
) is used as an argument to the function.Any code of the form:
can be rewritten as
This comment is hidden because it contains spoiler information about the solution
How come my code is working although I didn't set InitialValue for my reduce call, can anyone explain?
Too bad the best practice solution doesn't use neither slice or splice. If that is really best practice for this problem then the problem belongs in another lesson imo.
This comment is hidden because it contains spoiler information about the solution
Loading more items...