You don't need the 'else' statements. If your if statements have 'return' in their conditions (like this case) and there's only one statement that can be true (the person cannot have multiple ages so it doesn't pass through multiple if statements), you don't need the 'else' keyword. You can simply write 'if'.
Hi! I have a question: Why does my function only work in the Codewars text editor if I write "string.Join" - string with a lowercase letter? However, in my Visual Studio, the function works when writing string with both uppercase and lowercase letters.
No tiene sentido el tuyo por que .map() internamente crea una nueva matriz con los values
This comment is hidden because it contains spoiler information about the solution
These solutions showing me how I need to think differently and not overcomplicate things lol.
You don't need the 'else' statements. If your if statements have 'return' in their conditions (like this case) and there's only one statement that can be true (the person cannot have multiple ages so it doesn't pass through multiple if statements), you don't need the 'else' keyword. You can simply write 'if'.
i think so 👀
same here. One day...
it is returning a new array, you don't need to name it
But the system is saying that it should be another array, not the initial one.
Very strange.
This comment is hidden because it contains spoiler information about the solution
Hi! I have a question: Why does my function only work in the Codewars text editor if I write "string.Join" - string with a lowercase letter? However, in my Visual Studio, the function works when writing string with both uppercase and lowercase letters.
but this doesn't create a new Array, only replaces existing one?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Best!
Loved this solution...
Loading more items...