Skip to content

Commit 9a00792

Browse files
author
Walle Cyril
authored
discourage inconsistent Array()
1 parent 5e084cd commit 9a00792

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

js/Array.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ let array;
55

66
// same
77
array = [];
8-
array = Array();
8+
array = Array.of();
9+
array = Array(); // avoid because it is unsafe
910

1011
// set
1112
array[5] = "Hi";

0 commit comments

Comments
 (0)