71. In Node.js, what are streams primarily used for?
Answer:Handling large amounts of data efficiently, especially for reading or writing data sequentially
72. What is a key advantage of using streams in Node.js for I/O operations?
Answer:Streams allow data to be processed piece by piece, reducing memory consumption and improving performance.
73. In Node.js, which core module provides the foundation for working with streams?
74. What is a readable stream in Node.js?
Answer:A stream that can only be read from
75. What is a writable stream in Node.js?
Answer:A stream that can only be written to
76. In Node.js, which method is commonly used to pipe data from a readable stream to a writable stream?
77. What is the purpose of the fs.createReadStream method in Node.js?
Answer:To create a readable stream for reading data from a file
78. What is the purpose of the fs.createWriteStream method in Node.js?
Answer:To create a writable stream for writing data to a file
79. What is a duplex stream in Node.js?
Answer:A stream that can be both read from and written to
80. Which event is emitted by a readable stream when it reaches the end of the data?
Node Js Interview Questions With Answers Node Js MCQ Node Js Multiple Choice Questions Node Js MCQ Questions And Answers