Be Sociable, Share!

lunes, 9 de mayo de 2022

In JavaScript, there are seven fundamental data types

 

  • Number:  Any number, including numbers with decimals: 48151623.42.
  • String: Any grouping of characters on your keyboard (letters, numbers, spaces, symbols, etc.) surrounded by single quotes: ' ... ' or double quotes " ... ", though we prefer single quotes. Some people like to think of string as a fancy word for text.
  • Boolean: This data type only has two possible values— either true or false (without quotes). It’s helpful to think of booleans as on and off switches or as the answers to a “yes” or “no” question.
  • Null: This data type represents the intentional absence of a value, and is represented by the keyword null (without quotes).
  • Undefined: This data type is denoted by the keyword undefined (without quotes). It also represents the absence of a value though it has a different use than nullundefined means that a given value does not exist.
  • Symbol: A newer feature to the language, symbols are unique identifiers, useful in more complex coding. No need to worry about these for now.
  • Object: Collections of related data.

No hay comentarios:

Publicar un comentario