forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnumber.js
More file actions
38 lines (28 loc) · 1.26 KB
/
number.js
File metadata and controls
38 lines (28 loc) · 1.26 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
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
var x = 3;
var y = 5;
var xd = 4.6;
var yd = 9.2;
var myInf = Infinity;
WScript.SetTimeout(testFunction, 50);
/////////////////
function testFunction()
{
telemetryLog(`x: ${x}`, true); //3
telemetryLog(`y: ${y}`, true); //5
telemetryLog(`xd: ${xd}`, true); //4.6
telemetryLog(`yd: ${yd}`, true); //9.2
telemetryLog(`x + y: ${x + y}`, true); //8
telemetryLog(`x - y: ${x - y}`, true); //-2
telemetryLog(`x * y: ${x * y}`, true); //15
telemetryLog(`x / y: ${x / y}`, true); //0.6
telemetryLog(`isFinite(xd): ${isFinite(xd)}`, true); //true
telemetryLog(`isFinite(myInf): ${isFinite(myInf)}`, true); //false
telemetryLog(`isFinite(Infinity): ${isFinite(Infinity)}`, true); //false
telemetryLog(`Math.abs(-2): ${Math.abs(-2)}`, true); //2
telemetryLog(`Math.floor(1.5): ${Math.floor(1.5)}`, true); //1.0
emitTTDLog(ttdLogURI);
}