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.
just clear that me don't understanding whith '$' maybe it names like reduce it for me.
This comment is hidden because it contains spoiler information about the solution
Nope, unfortunately. So you know what to do ;-)
Isn't
-1
the way of targeting the last element of the array in JS?Why are you using
-1
in JS? ;-)This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This solution is not best practice, returning a boolean from a ternary operator is a waste of characters and known as antipattern
Thank you for your solution! Is it run?
Count how many
{
you have there and how many}
.Delete the calls to your function (you don't need them) and don't use
console.log
inside the function, usereturn
instead.This comment is hidden because it contains spoiler information about the solution
And your code is? Mark your post as having spoiler content and check how to use code markdown
Hi. Really I did it task (using JavaScript) in browser, but here I get
this error:
"
});
^
SyntaxError: Unexpected token )
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Object. (eval-wrapper:6:22)
at
at evalScript (bootstrap_node.js:432:27)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:575:3"
I tried to use "Set" but it seems something causing an error when compling. I can run my code when I copy and paste in to Eclipse though.
error messages are below:
FAILURE: Build failed with an exception.
Execution failed for task ':compileJava'.
This comment is hidden because it contains spoiler information about the solution