You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agreed. They could at least be named "some" and "another" so it's easier to remember which function or variable is which. "first" and "second" could work too.
Foo and bar just add mental strain to the examples:
var foo = {name: 'kitten'}
foo.name; // kitten
foo['name']; // kitten
var get = 'name';
foo[get]; // kitten
foo.1234; // SyntaxError
foo['1234']; // works
Why would you ever name foo kitten? It makes it harder to remember what's going on. Easier to use var person, and person.name. If you keep to a theme throughout the document I bet it would erase a lot of the foo bar overhead.
Activity
dashed commentedon Dec 18, 2014
see https://en.wikipedia.org/wiki/Foobar
timruffles commentedon Dec 18, 2014
?
chrisranderson commentedon Feb 7, 2015
Agreed. They could at least be named "some" and "another" so it's easier to remember which function or variable is which. "first" and "second" could work too.
Foo and bar just add mental strain to the examples:
var foo = {name: 'kitten'}
foo.name; // kitten
foo['name']; // kitten
var get = 'name';
foo[get]; // kitten
foo.1234; // SyntaxError
foo['1234']; // works
Why would you ever name foo kitten? It makes it harder to remember what's going on. Easier to use var person, and person.name. If you keep to a theme throughout the document I bet it would erase a lot of the foo bar overhead.
hugotox commentedon May 29, 2015
foo and bar are specially confusing for non english speakers (like me) because we can't translate/understand these words
timruffles commentedon Sep 29, 2015
Still a long way to go:
$ ack -hc '\b(foo|bar|baz|qux)\b' doc/en/ 164roccomuso commentedon Nov 3, 2015
Totally Agree.
timruffles commentedon Nov 4, 2015
PRs would be gratefully accepted on this one. Puns win extra points.
On Tue, Nov 3, 2015 at 9:28 PM, Rocco Musolino notifications@github.com
wrote:
siddharthkp commentedon Oct 9, 2017
My tiny contribution: #373
alieldeba commentedon Oct 18, 2022
agreed with that