In this video I'll show a few examples how to turn complex code in JavaScript into Simple and understandable code Follow me: Instagram / hovdallakyan x / hovdallakyan Camera: Sony A7C Mic: Hyperx Quadcast S
sometimes explicit if else statements are good for readability although that's definitely something that's up for one's preference, keep up the content
The secons function doesn't make sense at all. It's not needed. You can check a condition directly with with an if clause, ternary or logical operators. The function just returns what params you give it, it's useless