In Node.js, how can data be written to a writable stream?

  • Using the read() method
  • Using the write() method
  • Using the pipe() method
  • Using the readable() method
Data can be written to a writable stream in Node.js using the write() method. This method allows you to write data to the stream, which can be a file, network connection, or any other writable destination. The pipe() method is used for piping data from a readable stream to a writable stream, and the other options are not the correct ways to write data to a writable stream.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *