What Is A Variable?

Stripe Integration Freelance Gig external link
🔗 See other jobs


You can think of a variable like a bucket used to hold or store substance, in this the substance to be stored is data to be used within a program.

Use cases and Examples

01: var x = 1;
02: var result = 2 +x;
03: console.log("result contains: ", result);

The above Javascript code has two variables namely x is assigned the value 1 and result to the sum of 2 and x which should be 3;


Variables usually can store whatever data type is available within the programming language under discussion.

PHP Developer Freelance | E-learning Platform external link
🔗 See other jobs

Here is another article you might like 😊 "What Is A Web Framework?"