Outputs the content of array object - Node.js Array

Node.js examples for Array:Array Value

Description

Outputs the content of array object

Demo Code

function ArrayToString(arr, offs, len)
{
  var str = ""; 
  len += offs-1;  /*from ww w  . j a  v a 2 s . co  m*/
  for(var i=offs; i <= len; i++){
      str+=arr[i].toString(16).padLeft("0000").toUpperCase();
      str += (i < len) ? ", " : ", ";
  }
  return str;
}

Related Tutorials