node/test/fixtures/print-chars.js
Jackson Tian 4d78121b77 lib: simplify code with String.prototype.repeat()
use String.prototype.repeat() to simplify code, less code,
more semantically.

PR-URL: https://github.com/nodejs/node/pull/5359
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 16:42:58 -07:00

5 lines
106 B
JavaScript

var assert = require('assert');
var n = parseInt(process.argv[2]);
process.stdout.write('c'.repeat(n));