Variables

In mathematic a variable is an unknown value of which a person can find.

For example: x + 1 = 4

A person can find out what the value of x is.

A variable in programming is an object that holds a value.

For example x = 3

In this case variable is x and it holds a value of 3.

Value of a variable can be changed. For example x can be changed to 5.

There is no problem with it.

Some characters cannot be used in the names of variables.

For example: you cannot have a variable name which starts with number. 

Good variable name will mean something. For example carSpeed. We know that this variable contains speed of a car value, An opposite of that is variable a. We don't know what a is.

YouTube video

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator