We have blurred this solution (with [spoiler][/spoiler] tags) so that users who have not completed this challenge can read the discussion in this thread without giving away the solution.
I don’t have conditions(if(){}else(){}) in my solution just indexOf() then map it to return the risk, In what part I needed to use the ternary operator? , thank you !
I checked how your code works and admired how you reduce the possibilities , thank you for this pov of thinking. Through this I learned new way of thinking today!