Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
4
Task/Copy-a-string/JavaScript/copy-a-string-1.js
Normal file
4
Task/Copy-a-string/JavaScript/copy-a-string-1.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var container = {myString: "Hello"};
|
||||
var containerCopy = container; // Now both identifiers refer to the same object
|
||||
|
||||
containerCopy.myString = "Goodbye"; // container.myString will also return "Goodbye"
|
||||
4
Task/Copy-a-string/JavaScript/copy-a-string-2.js
Normal file
4
Task/Copy-a-string/JavaScript/copy-a-string-2.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue