What is a VARIABLE in programming? - 08

- Andrés Cruz

En español
What is a VARIABLE in programming? - 08

Variables are one of the fundamental characteristics of programming languages, they allow access to memory to store and retrieve (that is, we can read or store data) the data with which our programs are going to work.

age= 5;
name= "andres"

They have to have a very specific scheme and this can change depending on the programming language.

age = age + 1

Variables are actually a fairly flexible scheme in terms of their uses and for now I want you to stay with the idea that a variable is simply a software component that we can use to store and read data that can be of various types depending on what we saw previously.

Operators

In JavaScript, as in most programming languages, we have arithmetic operators to perform mathematical operations such as adding, subtracting, multiplying and dividing and also to perform comparisons; for example:

  1. + Sum. Operands can be integers or real
  2. - Subtraction. Operands can be integers or real
  3. * Multiplication. Operands can be integers or real
  4. / Division. Operands can be integers or real
  5. % Rest of division

Comparison in programming

Comparison operators are another fundamental element in any programming language and allow us to compare variables, expressions and obtain a value of true and false, that is, a boolean:

< Less than
> Greater than
<= Less than or equal
>= Greater than or equal
!= Different
== Same

As you saw in the previous example, with an example of how we can add ages, for example, in a unit; The same applies to the rest of the cases depending on the mathematical operator you want to use.

Andrés Cruz

Develop with Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz In Udemy

I agree to receive announcements of interest about this Blog.