Just started the new course.
Noticed that a function is declared as a const.
Is there a “real world” issue using one over the other?
(E.g. Hoisting issues can be negated - by using a newer / better build tool - so claiming “hoisting issues” as a reason to use CONST, seems “silly”: at least IMHO)
I am not really interested in "Under situation XX, that happens practically never, the garbage collector feels better about itself… ", either.
I have done a little googling / reading - and it seems that everyone has a different idea as to which is better and why and my opinion is “just another”.
I think declaring with function is a little cleaner / easier to read - but it is JUST a preference.
At work, we’re about to migrate an ancient (v0.13 - not even v1) Angular app to React (18) and wanted to have a definitive answer that could be implemented into a coding standard - with some real world reasoning behind it - if that is even possible.