News for hackers. Stuff that matters.
Re:JavaScript for Data Science by mLuby on Sunday April 25, 2021 @11:13AM (#26933342)
I've seen a majority of sources abandon the function keyword entirely in favor of const arrow declarations (and shorthand method syntax).

FWIW I personally like the function keyword, since it's clear what it is to non-JS readers, but primarily because it hoists to the top of its file, so unimportant utility functions can sit unobtrusively at the end of the file, thereby letting readers encounter more important logic earlier in the file.

Re:JavaScript for Data Science by genrez on Sunday April 25, 2021 @11:46AM (#26933607)
Interesting to know that what the article recommends is indeed the industry standard. I'd forgotten about hoisting until you brought it up!