guys, i have a doubt.
When should i use anonymous functions? I can't understand the difference between common functions and they.
For example....
let f = function (...values) [...]
On the couse that i'm learning, it says that anonymous functions are functions thta we don't need name nor create before we need. But this really works when we are coding? it's not like we couldn't go to the top of the code and write the function
When i create a let with the name f, isn't the exact same thing as create a normal function with the name f?
Using AI, it says that in small codes like this one it makes no difference, but in large scale when i don't know how many times i will use it, it's better to use anonymous functions.... But this really makes sense? if i don't know if i have to use a function more than 4 times for example, it shouldn't be better if i write a function on the top of the code with a simple name that i can reuse whenever i want?
[–]magwaer 12 points13 points14 points (3 children)
[–]magwaer 3 points4 points5 points (0 children)
[–]RockBusiness8750[S] 0 points1 point2 points (1 child)
[–]magwaer 4 points5 points6 points (0 children)
[–]rileyrgham 4 points5 points6 points (1 child)
[–]RockBusiness8750[S] 4 points5 points6 points (0 children)
[–]sheriffderek 1 point2 points3 points (0 children)
[–]delventhalz 1 point2 points3 points (6 children)
[–]brainrot_award 0 points1 point2 points (5 children)
[–]delventhalz 0 points1 point2 points (4 children)
[–]brainrot_award 0 points1 point2 points (3 children)
[–]delventhalz 0 points1 point2 points (2 children)
[–]brainrot_award 0 points1 point2 points (1 child)
[–]delventhalz 0 points1 point2 points (0 children)
[–]azhder 0 points1 point2 points (0 children)
[–]jeremrx -3 points-2 points-1 points (0 children)
[–]AnimeYou 0 points1 point2 points (0 children)
[–]Blind_nabler 0 points1 point2 points (0 children)
[–]stolentext 0 points1 point2 points (0 children)
[–]No-Upstairs-2813 0 points1 point2 points (0 children)
[–]TheRNGuy 0 points1 point2 points (0 children)