Generic Programming Terms Applicable to JavaScript

Navigation Aids -- This Page        Glossary Aids -- This Topic        Navigation Aids -- This Site

Generic Programming Terms

Most programming languages share the following generic terms. We reference these terms from many related topics. We have defined these terms at this one common point to reduce redundancy. We have built a column of synonyms that may clarify the terms.

Generic Programming Terms Applicable to JavaScript
Term Definition Synonym Example of Term
Token The smallest lexical unit of a programming language (categorized block of text). Must be contiguous characters. That is, a space would change the meaning possibly causing two tokens instead of one. The lexical analyzer reads in a stream of characters and categorizes them into tokens. This is called "tokenizing." categorized blocks of text literals, keywords, identifiers
operator symbols, punctuation

Regular Expressions are also tokens.
Identifier Identifiers are lexical tokens that name entities. The concept is analogous to that of a "name". Identifiers are used extensively in virtually all information processing systems. Naming entities makes it possible to refer to them. Objects, functions, variables and statements (label name) may all be named with an identifier. symbols
variable name
Literal A value (token) encoded directly in the program code. N/A 911
"strings can be literals"
Keyword A keyword is an identifier which indicates a specific command. Many times the keyword is restricted to the core language usage, in which case it is also considered a reserved word. Most languages have restrictions about reusing keywords as names for user-defined identifiers. N/A var
A complete list
Expression Expressions are one or more tokens that can be evaluated to a single value. A simple expression can be a stand alone identifier or literal. A complex expression will combine simple expressions with operators along with grouping symbols (such as brackets and parentheses). N/A total
(x + y) / z;
Operator Tokens that perform operations. The operations are built-in instructions of the programming language. Op Code
Statement Statements cause something in the program environment to change. The change can be to program flow, variables, objects or the user environment. A program is made up of a series of statements. A statement will have internal components (eg, expressions). instructions var blue = "#0066FF";
alert(typeof num);
Reserve Word A reserved word is used for some grammatical purpose in a programming language and cannot be used as an identifier. Reserved words are the implemented language keywords and any word planned for future use. N/A static
public (a common class type, but not used in JavaScript yet);
A complete list

A Program's Structure (the building blocks)

To summarize, we use tokens to make simple expressions. Then group the simple expressions with other keywords and operators to make complex expressions. These expressions are combined with core statement keywords to make statements. The statements are structured in a logical execution sequence to perform the work of a program. This is obviously over simplified, but you get the jest.


Rx4AJAX        About Us | Topic Index | Contact Us | Privacy Policy | 2008 This Site Built By PPThompson