forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoString.js
More file actions
29 lines (21 loc) · 754 Bytes
/
toString.js
File metadata and controls
29 lines (21 loc) · 754 Bytes
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
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function write(v) { WScript.Echo(v + ""); }
write(toString(["a"]));
function toString(o, quoteStrings) {
if (quoteStrings === true) {
return "recursive call"
}
eval("");
for (var i = 0; i < o.length; ++i) {
return toString(o[0], true);
}
}
var o = {};
Object.prototype.x = 20;
var x = 10;
with (o) {
write(x);
}