+ 1
Function or no?
I can’t find this question, so I’ll ask. When coding in JavaScript, when should I use a function? I know that you can reuse functions, but what if I’m not going to use it again? Is it a good habit, or do I only use it when necessary? Thanks
1 Odpowiedź
+ 3
If the function would shorten the code or make it more readable it would be better to use it.