Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

Node.js buffer values() Method

❮ Buffer Module


Example

Display each value in a buffer object:

var buf = Buffer.from('abcdef');

for (x of buf.values()) {
console.log(x);
}
Run example »

Definition and Usage

The values() method returns an iterator object, containing the value of each byte in a buffer object.


Syntax

buffer.values();

 Technical Details

Return Value: A JSON object
Node.js Version: 1.1.0

❮ Buffer Module