Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
39 lines (32 loc) · 913 Bytes

File metadata and controls

39 lines (32 loc) · 913 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var x = [3, null, {}];
var y = x;
y.baz = 5;
WScript.SetTimeout(testFunction, 50);
/////////////////
function testFunction()
{
ttdTestReport("Array.isArray(x)", Array.isArray(x), true);
ttdTestReport("x.length", x.length, 3);
ttdTestReport("x === y", x === y, true);
ttdTestReport("x.baz", x.baz, 5);
ttdTestReport("x[0]", x[0], 3);
ttdTestReport("y[1]", y[1], null);
ttdTestReport("x[5]", x[5], undefined);
////
x[1] = "non-null";
x[5] = { bar: 3 };
x.push(10);
////
ttdTestReport("post update -- y[1]", y[1], "non-null");
ttdTestReport("post update -- x[5] !== null", x[5] !== null, true);
ttdTestReport("post update -- x[5].bar", x[5].bar, 3);
ttdTestReport("post update -- y[6]", y[6], 10);
if(this.ttdTestsFailed)
{
ttdTestWrite("Failures!");
}
else
{
ttdTestWrite("All tests passed!");
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.