Computer scienceBackendNode.jsCore ConceptsInternal modulesBuffers

Buffer module

isBuffer

Report a typo

You need to compose a program by arranging lines of code. The program should show that after applying the toString method, we are working with a string, and not with a buffer.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                const stringFromBuffer = buffer.toString();
              
                console.log(Buffer.isBuffer(stringFromBuffer));
              
                const buffer = Buffer.from(data);
              
                const { Buffer } = require('node:buffer');
              
                const data = [72, 105];
              

Create a free account to access the full topic