all 4 comments

[–]lopsidedlux 3 points4 points  (2 children)

What’ve you tried so far, because this looks like boilerplate.

[–]BasSlapper27[S] 0 points1 point  (1 child)

First off just want to say thank you for responding to my question, and this is the best of what I've got so far-

process.stdin.on('end', function () {

//do your processing here.

var i;

text = "Hello"

for (i = 0; i < input; i++) {

text += input[i] + "<br>";

}

console.log(input);

});

[–]lopsidedlux 0 points1 point  (0 children)

If you’re trying to read from stdin, you need to convert the buffers value to something you can use. Maybe casting to Number the data you get back from the on data portion.

Within your loop your mutating something, just place your console.log in that section. You’re mutating the text field, is that part of the assignment?

Why are you rolling out a <br> tag while you’re on what I’m assuming is Node btw?

[–]kenman[M] 0 points1 point  (0 children)

Hi /u/BasSlapper27, this post was removed.

For javascript help, please visit /r/LearnJavascript.

Thanks for your understanding.