html
html
1
2
3
4
5
6
7
8
9
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
body {
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function A() {
this.a = "a";
}
var a = new A();
var b = a;
// delete a.a;
b.a = undefined;
console.log(a.a) // => b.a points to a.a,
// so b.a is the same as a.a ?
a = undefined;
console.log(b) // => the object still exists because
// it is referenced in b ?
// => deleting b.a deletes a.a but deleting a does
// not delete b
// => Can I delete the object without changing a ?
// => If I change b (e.g. b = null), the JS garbage
// collection deletes the object because it
// isn't reference anymore, right?
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run