var buf = new Buffer[1];
console.log(buf[0]);
The above code will print a random value of buf[0], anyone know why the
default value of a buffer element is not 0 but a random one, and what's the
rule of the value?
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joy
I would guess the rule is that there is no rule.
On Fri, Dec 7, 2012 at 6:13 PM, Goddy Zhao wrote:
> var buf = new Buffer[1];
> console.log(buf[0]);
>
> The above code will print a random value of buf[0], anyone know why the
> default value of a buffer element is not 0 but a random one, and what'
memory is continually reused so it may as well contain data from any other
connection.
On 08/12/2012, at 06:53, Mark Hahn wrote:
> I would guess the rule is that there is no rule.
>
> On Fri, Dec 7, 2012 at 6:13 PM, Goddy Zhao wrote:
>> var buf = new Buffer[1];
>> console.log(buf[0]);
>>
>>