Skip to content

Commit ab8801a

Browse files
committed
docs: update example and remove comments
1 parent cdc1523 commit ab8801a

File tree

1 file changed

+2
-11
lines changed
  • lib/node_modules/@stdlib/string/for-each/examples

1 file changed

+2
-11
lines changed

Diff for: lib/node_modules/@stdlib/string/for-each/examples/index.js

+2-11
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,11 @@
2020

2121
var forEach = require( './../lib' );
2222

23-
/* eslint-disable no-unused-vars */
24-
function log( value, index, str ) {
25-
var repeatStr = value + value;
26-
console.log( '%s: %d', index, repeatStr );
23+
function log( value, index ) {
24+
console.log( '%d: %s', index, value );
2725
}
2826

29-
// Iterates over each visual character:
3027
forEach( 'presidential election', log );
31-
32-
// Iterates over each visual character:
3328
forEach( 'Iñtërnâtiônàlizætiøn', log );
34-
35-
// Iterates over each visual character:
3629
forEach( '🌷🍕', log );
37-
38-
// Iterates over each visual character:
3930
forEach( '\uD834\uDD1E', log );

0 commit comments

Comments
 (0)