mdn/js/0_javascript_first_steps/3_variables

3_variables

dz / mdn / js / 0_javascript_first_steps / 3_variables

Summary

Variables

Node Tree

Nodes

variables
content Variables
children container_for_value (description), declaring, dynamic_typing, initializing, let, var, variable_types

declaring
content Declaring
children let
parents variables

container_for_value
content Container for value
parents variables

let
content let
children cant_redeclare, var ("let" is more modern than "var")
parents declaring, variables

var
content var
children hoisting, older
parents let, variables

initializing
content initializing
parents variables

cant_redeclare
content Can't redeclare
parents let

older
content Older, confusing, error-prone
parents var

hoisting
content hoisting
parents var

variable_types
content Variable Types
children numbers, objects, strings, structure_models_real_life, arrays, boolean
parents variables

strings
content Strings
parents variable_types

numbers
content Numbers
parents variable_types

arrays
content Arrays
parents variable_types

boolean
content Boolean
parents variable_types

objects
content objects
children constant_objects_updatable
parents variable_types

structure_models_real_life
content Structure of code that models a real-life object
parents variable_types

dynamic_typing
content Dynamic Typing
children type_specification_unneeded (description)
parents variables

type_specification_unneeded
content No need to specify what data type a variable will contain
parents dynamic_typing

constants
content constants
children constant_objects_updatable

constant_objects_updatable
content Can update constant objects because pointer is the the same
parents objects, constants