What's the meaning of "foo"? [closed]

RFC 3092: The Etymology of "Foo" This shows in a drawn out sort of way how Foo was originally to be paired with bar to create foobar (AKA Fubar). These terms are best used for pseudo or fake coding. They are also useful in examples to allow for everyone to follow the variables quite easily. Here is the Wikipedia Link as well!


When someone wants to give a code example, foo is typically used as a way to say "place the actual name of the variable/function/class you will use here".


From your linked Wikipedia article:

"metasyntactic variable" is synonymous with "meaningless word"

It's just a nonsense word when you need to name a variable or function but the actual name doesn't matter. Really only used for demonstration of code snippets. NEVER use it in real code.


In short, 'foo' and 'bar' are simply placeholders for information you have, such as a username, password, variable, etc.