Nodejs Utililty Methods Array Dump

List of utility methods to do Array Dump

Description

The list of methods to do Array Dump are organized into topic(s).

Method

dump()
Array.prototype.dump = function () {
    for (var element in this) {
        print(element, this[element]);
};
var custom = ['1', 2, "three"];
custom.dumper = function () {
    print("something");
};
...
dump()
Array.prototype.dump = function(){
  var output = new Array();
  var number = 0;
  output.push('<tr><th>#</th><th>Key</th><th>Value</th></tr>');
  for(var i in this){
    if(typeof eval(this.get(i)) != 'function'){
      output.push('<tr><td>' + number + '</td><td>' + i + '</td><td>' + this.get(i) + '</td></tr>');
      number++;
  return 'Array dump: <table>' + String.fromCharCode(10) + output.join(String.fromCharCode(10)) + String.fromCharCode(10) + '</table>';