forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfuncname_asg.js
More file actions
26 lines (22 loc) · 752 Bytes
/
funcname_asg.js
File metadata and controls
26 lines (22 loc) · 752 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
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function test()
{
var i = 0;
// This only create one function assignment. The name f1 is only available inside the function
// via LdFuncExpr
var f = function f1()
{
if (i == 0)
{
i++;
return f1();
}
return i;
}
return f();
}
WScript.Echo(test());
WScript.Echo(test());