Create a gist now

Instantly share code, notes, and snippets.

@djyugg /poh05_1.js
Last active Aug 29, 2015

What would you like to do?
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (chunk) {
var displayCharacters = Array.prototype.filter.call(chunk, function (s, i) {
return (i % 2) === 0;
});
console.log(displayCharacters.join().replace(/,/g, ""));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment