Ad
  • Default User Avatar

    Assignments define variables globally if you don't use const, let or var. Var is defined only in the innermost function where defined, and let and const are only defined in the block where defined.