I mean, traffic lights are human made gadgets so "in real life" lights go as whatever way you design them to go.
Nicely done.
читается, просто вы еще не потратили много времени на кодирование
This comment is hidden because it contains spoiler information about the solution
Depends what country you're in.
Переделывай - это хуйня не читаемая!
the interesting thing is that in real life yellow goes past red, not green :D
It's a complete misuse of ternary operators. You should only use ternary operators when you're going to return something with it.
it is advised not to use nested ternary operators because it might easily get confusing :) at least, that is what i learned
I did not even know you could nest ternary operators like this.
I don't see why you are so hateful and make random assumptions.
The person who did this Kata is a former student from Ironhack. He is NOT working for Ironhack. He is a junior developer and did this to contribute.
I agree the Kata could be better. But I think it's nice. I recently did a technical interview where I had something similar to this.
Is it really best for a traffic light to go 'green' as the default case?
Ok, my bad. Now it should be fixed :)
Test.expect is defined as Test.expect(booleanValue[, errorMessage]), not Test.expect(actual, expected[, errorMessage]). The tests can be passed by simply returning true.
Test.expect
Test.expect(booleanValue[, errorMessage])
Test.expect(actual, expected[, errorMessage])
true
I fixed it, thanks for the feedback!
Loading collection data...
I mean, traffic lights are human made gadgets so "in real life" lights go as whatever way you design them to go.
Nicely done.
читается, просто вы еще не потратили много времени на кодирование
This comment is hidden because it contains spoiler information about the solution
Depends what country you're in.
Переделывай - это хуйня не читаемая!
the interesting thing is that in real life yellow goes past red, not green :D
It's a complete misuse of ternary operators. You should only use ternary operators when you're going to return something with it.
it is advised not to use nested ternary operators because it might easily get confusing :) at least, that is what i learned
I did not even know you could nest ternary operators like this.
I don't see why you are so hateful and make random assumptions.
The person who did this Kata is a former student from Ironhack. He is NOT working for Ironhack. He is a junior developer and did this to contribute.
I agree the Kata could be better. But I think it's nice. I recently did a technical interview where I had something similar to this.
Is it really best for a traffic light to go 'green' as the default case?
Ok, my bad. Now it should be fixed :)
Test.expect
is defined asTest.expect(booleanValue[, errorMessage])
, notTest.expect(actual, expected[, errorMessage])
. The tests can be passed by simply returningtrue
.I fixed it, thanks for the feedback!
Loading more items...