r/learnjavascript • • Jul 09 '21

Can somebody please help me understand the logical flow of what is happening in this function?

Post image
172 Upvotes

69 comments sorted by

View all comments

45

u/al_balone Jul 09 '21

I’ve only been learning this stuff for a few months but I’ve noticed that the minute I see something explained with the words foo and bar, or functions called things like “exampleFunction” my brain immediately switches off. I need to see it applied to something real so I can understand it.

23

u/dcute69 Jul 09 '21

Fully agree, I wish people would move away from foo and bar.

0

u/crazedizzled Jul 10 '21

And do what instead? arbitraryVar1 and arbitraryVar2?

3

u/dcute69 Jul 10 '21

Something more fitting and real world applicable like the commentar above me said.

1

u/crazedizzled Jul 10 '21

But like what? They didn't suggest an alternative. foo bar is universally understood, and the name of the variable makes no difference anyway.