Javascript Array dump()

Description

Javascript Array dump()


Array.prototype.dump = function () {
    for (var element in this) {
        print(element, this[element]);
    }/*from w  w w  .j  a  v a2 s.com*/
};

var custom = ['1', 2, "three"];

custom.dumper = function () {
    print("something");
};

custom.dumper();
custom.dump();



PreviousNext

Related