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.
This has nothing to do with the exponent rules.
(x)
is the same asx
and the parenthesis are useless in an expression like(x)
or(x)^3
(just likesin(x)
is the same as(sin(x))
, andsin(x)^2
the same as(sin(x))^2
); it is normal and natural not to write them. In general, withf
a function,f(x^2)
is different fromf(x)^2
, and there is no need to write this(f(x))
to make it clearer, it would be just cumbersome. This is universal notation, if you are not comfortable with this it's your problem, but please don't do pointless suggestions.but (x)^3 is aquivalent to (x^3).
Just look at the exponent rules: (a^m)^n = a^(mn) = a^(nm) = (a^n)^m
(x)^3 = x^(13) = x^(31) = (x^3)^1 = (x^3)
Maybe because
sin (x)^3 is in my view equivalent to sin (x^3)
is obviously erroneous? And adding unnecessary parenthesis is pointless?Why so many down votes?
(x)^3 = (x^1)^3 = x^(1*3) = x^3 = (x^3)
and sin(x)^3 != sin(x) * sin(x) * sin(x)
it's sin(x)^3 = sin (x^3)
just use parentheses (sin(x))^3 = sin(x) * sin(x) * sin(x)
Wouldn't it be better to use parentheses?
sin (x)^3 is in my view equivalent to sin (x^3) = sin (xxx)
but (sin(x))^3 makes it clear.
(or sin^3 (x), like in sin^2(x) + cos^2(x) = 1)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
changed to 'maze'
fixed
I know the code will still work, that's why I tagged this as a suggestion and not an issue.
I'm very new to JS, so maybe I'm not used to seeing a variable with the same name as commonly used functions and/or data structures. But in my experience in other languages, this is not best practice.
This comment is hidden because it contains spoiler information about the solution
This is not a proper way to raise an issue. Consecutive spaces don't display properly in markdown, we don't know what you are refering to. If the
map
argument annoys you, you just can give it another name. However, there is no reason a parameter could not be namedmap
in Javascript, there is no ambiguity possible withArray.prototype.map
if that's your idea (however we cannot know since you don't say it). Please read carefully the documentation and try to follow a minimal quality at the time of posting issues if you hope somebody is able to fix them someday: https://docs.codewars.com/training/troubleshooting/The test cases are a mess!
there's a test on a string " xoxoox " which obviously has a space at it's end so no matter how much the 'x' and 'o' changes the space will not be effected. Eventually the result should be true but the test expects it to be false!
This challenge has another issue which is the name of the argument! it should be something else than 'map' because it can get confusing in some cases.
Why?
The parameter is the JavaScript translation should be called something other than
map
.Loading more items...