Complete the code to read input from the user using process.stdin.
process.stdin.setEncoding('[1]');
The encoding 'utf8' is commonly used to read text input correctly from process.stdin.
Complete the code to write 'Hello World' to the console using process.stdout.
process.stdout.[1]('Hello World\n');
The method 'write' sends data to the standard output stream.
Fix the error in the code to correctly listen for data input from process.stdin.
process.stdin.on('[1]', (data) => { console.log('You typed:', data); });
The 'data' event is emitted when the stream receives input data.
Fill both blanks to create a program that reads a line and then ends the input stream.
process.stdin.setEncoding('[1]'); process.stdin.on('[2]', (input) => { console.log('Input:', input); process.stdin.end(); });
Set encoding to 'utf8' to read text, and listen to 'data' event to get input.
Fill all three blanks to create a program that reads input, converts it to uppercase, and writes it back.
process.stdin.setEncoding('[1]'); process.stdin.on('[2]', (chunk) => { const upper = chunk.[3](); process.stdout.write(upper); });
Use 'utf8' encoding, listen to 'data' event, and convert input to uppercase with 'toUpperCase()'.