Why change something that is not already broken for something that is not as good?
Again, you are assuming that you have enough knowledge to make that determination.
I used rest operators to complete the problem, and suddenly format is the issue, really?
Again, IIFEs are not a formatting issue. If you think the only difference between an IIFE and a standard function is formatting, then you are confused.
No, because that is called the real world. Where time is money, and if something works don’t screw it up. … if you are working with a client, they really don’t care either as long as it works, you can maintain it, and its simple. If they are paying you by the hour, they would be happiest if you used the best, simplest, and most creative way possible to get it done quicker.
You are assume what it means if it “works” - again there are situations where a non-IIFE will not “work”. And “simple” is a nice goal, but not always the best. As my engineering professor used to say, “For every problem, there is a simple, elegant solution - that is incorrect.” Obviously simplicity where possible is a good thing, but it can also be a siren luring you onto the rocks.
If someone else wrote code in another format, …
Again, not a formatting issue. It’s an “understanding the difference between a standard function and an IIFE and being able to follow simple instructions without making things so complicated” issue. Again, your boss may have very specific reasons for things to be done a certain way. It’s not his job to explain and justify himself to you.
As long as i can read it, its somewhat simple, and gets the job done i can care less. Not my problem, i do my job people do theirs.
The vast majority of dev jobs are working as a team. I would not want to work on a team with someone that intransigently insists that his way is the best way, even before he’s learned the basic principles involved. If you are this pushy while you are learning, I am terrified of where you might end up once you actually know what you are talking about.
These debates always leave me gobsmacked. I have students with similar attitudes. They argue and argue about every little point. They are trying to make judgements about things they don’t yet understand. They demand to know why. Unfortunately, explaining why requires other knowledge they don’t have, and if they just shut up and did what I said in the first place they would learn so much faster - they would come to understand in situ instead of having to bring their education to a screeching halt while they try to swim in waters too deep for them. I hate those students, not because I hate explaining these deeper subjects (I love teaching that stuff) but because I know that they won’t truly understand and will waste too much time trying and/or will not learn the correct way because they are too busy arguing. They never develop as players.
This is about to get flamey, so I’ll leave it there. I’ll ignore this thread, if you have any further comments, you can PM me.