Newby Coder header banner

Statement

A computer program is a list of "instructions" to be "executed" by a computer

In a programming language, these programming instructions are called statements

What is a Statement in programming

A statement is a syntactic unit of a programming language that expresses some action to be carried out

A statement may have internal components (e.g., expressions)

A statement directs the computer to perform a specified action

A single statement in a high-level language (like C, Java) can represent several machine-language instructions

Statements are composed of:

Values, Operators, Expressions, Keywords, and Comments

Consider following example javascript code

 function ncx() {
    var x;
    x = "seventeen";
    var y = 17 + 2;
    x = y; x = x + 17 + 2 * math.sqrt(17);
    return x;
}
ncx();