InterviewSolution
Saved Bookmarks
| 1. |
Mention some of the interactions you can make with buffer data? |
Answer»
Example: How to convert BINARY EQUIVALENT of STREAM xyz to JSON format: create a javascript file with following code. var BUF = Buffer.from('xyz'); console.log(buf.toJSON());in the first LINE buf is the variable and Buffer is the Buffer class. Using toJSON method we can convert code as shown in the result below. Execute the code : Following is the result { type: 'Buffer', data: [ 120, 121, 122 ] } |
|