Here is a Javascript arrow function, that uses nested ternary operators. Someone probably already posted this answer, but hey main point is that I took the challenge and solved by myself.
constgetEvolutionRateMessage=(before,after)=>{constrate=Math.round((((after==0?-before*before+before:after)-before)/(before==0?1:before))*100);returnrate==0?"No evolution.":rate>0?`A positive evolution of ${rate}%.`:`A negative evolution of ${-1*rate}%.`;};
Here is a Javascript arrow function, that uses nested ternary operators. Someone probably already posted this answer, but hey main point is that I took the challenge and solved by myself.
Thanks for showing us your solution. What's important is what you achieve at the end of the day!