Skip to content

Commit 8b01d81

Browse files
authored
chore: fix JavaScript lint errors
PR-URL: #10331 Closes: #10327 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com> Reviewed-by: Geo Daoyu <geodaoyu@foxmail.com> Signed-off-by: Bhargav Dabhade <bhargava2005dabhade@gmail.com>
1 parent f834c92 commit 8b01d81

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/node_modules/@stdlib/utils/tabulate-by/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ function indicator( value ) {
144144
vals = [ 'beep', 'boop', 'foo', 'bar', 'woot', 'woot' ];
145145

146146
// Generate a random collection...
147-
arr = new Array( 100 );
148-
for ( i = 0; i < arr.length; i++ ) {
147+
arr = [];
148+
for ( i = 0; i < 100; i++ ) {
149149
j = floor( randu()*vals.length );
150-
arr[ i ] = vals[ j ];
150+
arr.push( vals[ j ] );
151151
}
152152

153153
// Generate a frequency table:

lib/node_modules/@stdlib/utils/tabulate-by/examples/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ function indicator( value ) {
3535
vals = [ 'beep', 'boop', 'foo', 'bar', 'woot', 'woot' ];
3636

3737
// Generate a random collection...
38-
arr = new Array( 100 );
39-
for ( i = 0; i < arr.length; i++ ) {
38+
arr = [];
39+
for ( i = 0; i < 100; i++ ) {
4040
j = floor( randu()*vals.length );
41-
arr[ i ] = vals[ j ];
41+
arr.push( vals[ j ] );
4242
}
4343

4444
// Generate a frequency table:

0 commit comments

Comments
 (0)