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
Because test suite calls your function without parameters, like this:
let result = hello();
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