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.
A little late, but you're printing num1 twice there because you overwrote num2 value before.
This comment is hidden because it contains spoiler information about the solution
XD
good
thanks for your explanation ^^
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
i think
int a[]
is a copy of array, so sorting it have no problem.This comment is hidden because it contains spoiler information about the solution
cleverrrrrr
i love regex
This comment is hidden because it contains spoiler information about the solution
function add(a) {
const sum = b => add (a + b);
sum.valueOf = () => a;
total return;
}
Example:
___ const addTwo = add (2) // sum = (b) => 2 + b; Returns sum function with sum.valueOf = () => 2;
|
|__ addTwo + 5 // 7 sum.valueOf ran when doing math and returned 2 so 2 + 5 = 7;
|
|__ addTwo + add(1) // 3 Both sum.valueOf of the two sum functions ran and returned 2 and 1 so 2 + 1 = 3
___ addTwo(3) // sum = () => 5 + b; Returns sum function with sum.valueOf = () => 5;
|
|__ addTwo(3) == 5 // true Because sum.valueOf ran when you compare with "==" and returned 5 so 5 == 5 is true;
Am I wrong?
clever
now i know Regex is awesome
Loading more items...