Be Sociable, Share!

sábado, 14 de mayo de 2022

Review Variables

 

  1. Variables hold reusable data in a program and associate it with a name.
  2. Variables are stored in memory.
  3. The var keyword is used in pre-ES6 versions of JS.
  4. let is the preferred way to declare a variable when it can be reassigned, and const is the preferred way to declare a variable with a constant value.
  5. Variables that have not been initialized store the primitive data type undefined.
  6. Mathematical assignment operators make it easy to calculate a new value and assign it to the same variable.
  7. The + operator is used to concatenate strings including string values held in variables.
  8. In ES6, template literals use backticks ` and ${} to interpolate values into a string.
  9. The typeof keyword returns the data type (as a string) of a value.

No hay comentarios:

Publicar un comentario