forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstructor.js
More file actions
50 lines (40 loc) · 1.09 KB
/
constructor.js
File metadata and controls
50 lines (40 loc) · 1.09 KB
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
40
41
42
43
44
45
46
47
48
49
50
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function foo(x) {
this.x = x;
}
var f = new foo(10);
foo.prototype = { y : 10 };
var f1 = new foo(20);
function bar(x, y) {
this.x1 = x;
this.x2 = x;
this.x3 = x;
this.x4 = x;
this.x5 = x;
this.x6 = x;
this.x7 = x;
this.x8 = x;
this.x9 = x;
this.y1 = y;
this.y2 = y;
this.y3 = y;
this.y4 = y;
this.y5 = y;
this.y6 = y;
this.y7 = y;
this.y8 = y;
this.y9 = y;
}
var b1 = new bar(10, 20);
var b2 = new bar(30, 40);
WScript.SetTimeout(testFunction, 50);
/////////////////
function testFunction()
{
telemetryLog(`f.y ${f.y}`, true);
telemetryLog(`f1.y ${f1.y}`, true);
telemetryLog(`b2.y8 ${b2.y8}`, true);
}