top of page

Value

Value is the contents of the location with which the variable is declared and associated.

There are three kinds of variable declarations in React.js

(Grammar and Types - JavaScript | MDN, n.d.):

  • var – Declaring a variable, optionally initializing it to a value 

  • let – Declaring a block-scoped, local variable, optionally initializing it to a value.

  • const – Declaring a block-scoped, read-only named constant
      

In React.js:

  • The L-value is the address or storage location of the variable. It refers to the memory address where the variable is stored. It represents a variable’s identity and where it’s stored in memory.
     

  • The R-value is the data or value contained in the variable. It refers to the actual data or value stored in the variable. It's the value that gets read when the variable is used in an expression.

- Chan Jia Xuan
- Phung Yi Xuan
bottom of page