Skip to content

Commit 4c89d3d

Browse files
committed
fix: replace new Array() with array literal and push in wilcoxon examples
Replace `new Array( 100 )` with `arr = []` and `arr.push()` to comply with stdlib/no-new-array linting rule. ES5-compatible solution. Ref: #10943
1 parent ed4dee6 commit 4c89d3d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • lib/node_modules/@stdlib/stats/wilcoxon/examples

lib/node_modules/@stdlib/stats/wilcoxon/examples/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ var i;
2929
runif = uniform( -50.0, 50.0, {
3030
'seed': 37827
3131
});
32-
arr = new Array( 100 );
33-
for ( i = 0; i < arr.length; i++ ) {
34-
arr[ i ] = runif();
32+
arr = [];
33+
for ( i = 0; i < 100; i++ ) {
34+
arr.push( runif() );
3535
}
3636

3737
// Test whether distribution is symmetric around zero:

0 commit comments

Comments
 (0)