forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeleteArray.js
More file actions
37 lines (26 loc) · 1.04 KB
/
deleteArray.js
File metadata and controls
37 lines (26 loc) · 1.04 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
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
Object.prototype[5] = "obj.proto5";
Object.prototype[7] = "obj.proto7";
Array.prototype[1] = "arr.proto.1";
Array.prototype[2] = "arr.proto.2";
Array.prototype[3] = "arr.proto.3";
Array.prototype[6] = "arr.proto.6";
var n=8;
var i=0;
var arr = new Array(n);
for (i=3;i<n;i++) { arr[i] = i * i + 1; }
delete arr[1];
delete arr[3];
WScript.SetTimeout(testFunction, 50);
/////////////////
function testFunction()
{
telemetryLog(`${delete arr[n-1]}`, true);
telemetryLog(`T3:${arr.length} : ${arr}`, true);
telemetryLog(`${delete arr[n+1]}`, true);
telemetryLog(`T4:${arr.length} : ${arr}`, true);
emitTTDLog(ttdLogURI);
}