Skip to content

Commit 5bd8a07

Browse files
committed
Sort mixed array (probably bug in BigInt)
1 parent 90de161 commit 5bd8a07

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

JavaScript/9-bigint.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

3-
// 2 ** 53 - 1
3+
// node.js version 10.8.0
4+
// V8 version 6.7.288.49-node.19
45

56
console.log('MAX_SAFE_INTEGER =', Number.MAX_SAFE_INTEGER);
67
console.log('MAX_SAFE_INTEGER + 1 =', Number.MAX_SAFE_INTEGER + 1);
@@ -41,3 +42,8 @@ console.log();
4142

4243
console.log('(1000n ** 200n) / 12321n =', (1000n ** 200n) / 12321n);
4344
console.log();
45+
46+
const array = [-2, 7, 1n, 3, -2n, 8n, 5, -4n];
47+
console.log(array);
48+
console.log(array.sort());
49+
console.log();

0 commit comments

Comments
 (0)