What will be the default encoding when converting a buffer to a string in Node.js?
- utf-8
- binary
- ascii
- base64
When converting a buffer to a string in Node.js, the default encoding is utf-8. It's important to specify the encoding when performing this conversion, as using the wrong encoding can lead to incorrect results or data corruption.
Loading...
Related Quiz
- n CRUD operations, which operation is used to modify existing data?
- What is the primary use of the spread operator in JavaScript?
- How can you handle errors in middleware in Express.js?
- In which scenario is a full-text search most appropriately used?
- The process of rewriting a SQL query to improve its efficiency without changing its behavior is known as ________.