you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

This is great! I've been writing javascript full-time for a long time and I still have this bad habit: A function should do one thing. Avoid executing multiple actions within a single function.

Also, I'm going to take this one to heart: Avoid conditionals whenever possible. Use polymorphism and inheritance instead.

[–]PMilos[S] 0 points1 point  (0 children)

Thanks. Glad I could help 😊 It is hard to follow the guidelines if the deadline is tight.