#atom

Content:
JavaScript is a dynamically typed language, meaning variables can hold values of any type without explicit type declaration. JavaScript data types are divided into two categories: primitive and non-primitive (reference) types.

Primitive Data Types:

  1. number: Represents numeric values, including integers and floating-point numbers.

    let age = 25;
    let price = 99.99;
    
  2. string: Represents textual data enclosed in single or double quotes.

    let name = 'Alice';
    
  3. boolean: Represents a logical value: true or false.

    let isActive = true;
    
  4. undefined: Represents a variable that has been declared but not assigned a value.

    let x;
    console.log(x); // undefined
    
  5. null: Represents an intentional absence of any object value.

    let y = null;
    
  6. bigint: Represents integers larger than the number type can handle.

    let bigNumber = 1234567890123456789012345678901234567890n;
    
  7. symbol: Represents a unique and immutable value, often used as object property keys.

    let id = Symbol('id');
    

Non-Primitive Data Types:

  1. object: Represents a collection of key-value pairs. This includes arrays, functions, and objects.

    let person = { name: 'Alice', age: 25 };
    let colors = ['red', 'green', 'blue'];
    
  2. function: Functions are objects that can be called to perform tasks.

    function greet() {
        console.log('Hello!');
    }
    

Type Checking:

Connections:


Connections:


Sources: