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.
ternary better only for small,simple functions
love that solution
This comment is hidden because it contains spoiler information about the solution
In the company I work with, the way our project is set up in REACT is that nested ternary won't pass pipeline build.. Also Prettier will get upset I think.. Although this solution looks clever and damn good as hell, readabiliy is also important.
because n is the number of hotdogs youre going to sell... so youre basically demonstrating if you sell more then a discount is applied
I don't get why mine didn't work. Why are we multiplying?
Sorry bro, first comment ever T.T, my bad...
Use spoiler flag next time, please.
This comment is hidden because it contains spoiler information about the solution
very easy
It's always returning and always multiplying n by something, this solution avoids unnecessary repetition and looks much clearer to me than a bunch of similar ifs.
The only thing I don't like is the lack of spaces in the displayed variation. There could be some named variable for the multiplier too.
It is not best practice, only "all in one line" solutions winner.
Wow! What a clean and elegant solution! :)
I knew someone would make it even more compact lol!
This comment is hidden because it contains spoiler information about the solution
Loading more items...