Skip to content

Commit de1ef8b

Browse files
committed
docs: fix example
1 parent d05d7b3 commit de1ef8b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/node_modules/@stdlib/array/bool/README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ Invokes a function once for each array element.
869869

870870
```javascript
871871
function log( v, i ) {
872-
console.log( '%s: %s', i, v.toString() );
872+
console.log( '%s: %s', i.toString(), v.toString() );
873873
}
874874

875875
var arr = new BooleanArray( 3 );
@@ -897,7 +897,7 @@ To set the function execution context, provide a `thisArg`.
897897
```javascript
898898
function fcn( v, i ) {
899899
this.count += 1;
900-
console.log( '%s: %s', i, v.toString() );
900+
console.log( '%s: %s', i.toString(), v.toString() );
901901
}
902902

903903
var arr = new BooleanArray( 3 );
@@ -911,11 +911,6 @@ arr.set( false, 1 );
911911
arr.set( true, 2 );
912912

913913
arr.forEach( fcn, context );
914-
/* =>
915-
0: 1 + 1i
916-
1: 2 + 2i
917-
2: 3 + 3i
918-
*/
919914

920915
var count = context.count;
921916
// returns 3

0 commit comments

Comments
 (0)