var a = "Hello"; var b = a; // Same as saying window.b = window.a b = "Goodbye" // b contains a copy of a's value and a will still return "Hello"