Good point. Of course, data.length is a number, so it won't have a newline
to worry about anyway. But if you're just displaying the data *string*, the
brackets (or choose your favorite delimiter) are an excellent idea:

  console.log( '[' + data + ']' );

That would make it obvious if data has a newline or other whitespace.

-Mike

> From: Andy Matthews
> 
> I'm a fan of this approach:
> 
> console.log('[' + data.length + ']')

Reply via email to