forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparseShortCut.js
More file actions
24 lines (22 loc) · 831 Bytes
/
parseShortCut.js
File metadata and controls
24 lines (22 loc) · 831 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
//-------------------------------------------------------------------------------------------------------
// 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(i)
{
WScript.Echo(parseInt(i).toString());
WScript.Echo(parseFloat(i).toString());
WScript.Echo(parseInt(-i).toString());
WScript.Echo(parseFloat(-i).toString());
}
Test(400012312542180394829e30);
Test(4.00012312542180394829e21);
Test(4.00012312542180394829e20);
Test(9.9999999999999999999e20);
Test(1e20);
Test(Infinity);
Test(NaN);
Test(0.00001);
Test(0.000001);
Test(0.0000001);
Test(0.0000000000000001);