Array get Identifiable - Node.js Array

Node.js examples for Array:Array Value

Description

Array get Identifiable

Demo Code


Array.prototype.getIdentifiable = function (identity) {
    var i = this.length;
    while (i--) {
        if (this[i].identity == identity) {
            return this[i];
        }//from w w w  .  java  2  s . c  o m
    }
    return undefined;
};

Related Tutorials