Initial ES modules support
This commit is contained in:
+3
-1
@@ -8,7 +8,9 @@
|
||||
// - Holes are not skipped: a callback sees undefined for a hole
|
||||
|
||||
// `Array(n)` and `new Array(n)` make an array of `n` holes
|
||||
function Array(n) {
|
||||
import { relativeIndex } from "jsrt:string";
|
||||
|
||||
export function Array(n) {
|
||||
const a = [];
|
||||
if (n !== undefined) a.length = n;
|
||||
return a;
|
||||
|
||||
Reference in New Issue
Block a user