Values and Variable in JavaScript?

Values and Variable in JavaScript?

Episode - 1

Ajay Yadav's photo
Ajay Yadav
·Jun 14, 2022·

1 min read

Play this article

What is value?

  • A value is a fixed object.
  • Or, a value is a definite item or entity.
  • In the context of programming, A values can be a number, string, double, function, etc

Note: javascript function also produces a value!

What is the use of value?

  • Values are used to perform calculations.
  • Suppose, 10 & 20 are values, you can add, and subtract, them using an operator!

How to invoke or call value?

  • You can invoke or call your values with their name, which is a variable.

What is a variable?

  • Variable is "bucket" for storing "water"

Buckets => Memory

Water => Data or value

  • Or, variables are container/memory for storing data values.

  • Or, A value stored in a variable.

  • Or, A variable can be stored in any data, for example, number, string, etc.

  • Or, a variable contains a value.

  • Or, a variable is the name of the memory location.

😍That's all for now, thanks for reading this article to the end.

🔔 Don't forget to follow me on:



Share this