Home computer Programming- What Is Statement (Definition And Working)

Programming- What Is Statement (Definition And Working)


What is A Statement In Computer Programming

In computer programming a statement is the smallest set of instructions that can able to operate independently . A statement element carried a specific action and deploy it when it is used .

Basic Examples Of Statments

If , while and for are the basic examples of statements . All of three are the statements . Suppose developer use “if” statement in his programming code . if statement check the condition , if condition is match then code is executed .


var a =10;

if( a==10){

execute code;



In this code if statement test the condition that variable value is equal to 10 . If condition is right the code is under { }curly braces is executed . Now in this code if statement carry a complete function and do some operations

  1. Analyze or compare the value
  2. Make decision that comparison is matched with  condition or not
  3. Execute the code or do action

One line definition

All of programming codes or set of instruction that can do specific action independently are called Statements