I’m struggling with a nested ternary operator for some time now. Just can’t seem to get it right.
The condition would be to change the opacity of an element depending on times of certain days.
Every day: between 10pm and 6am → 100
Sunday and Wednesday: between 6am and 6pm → 0 (I only use the condition until 6pm because the first condition already covers before 6am)
Monday and Thursday: between 6pm and 10pm → 0 (I only use the condition until 6pm because the first condition already covers after 10pm)
Every other occasions → 100
Here’s a code and also simulated with if-then. What am I missing?
I think so.
I suggested that they include a text file for notes and comments. Perhaps one of the code editor would be something even better but I think that is beyond the scope.