Static

Description

The array is read and sent to a callback function

Usage

Parameters

  • array {Array|Object|Integer}

    If the value is an integer, it returns to perform a number of loop iteration

  • callback {Function}

    two parameters :

    • index
    • value

Example

var foo = ["bar", "test"];
CE.each(foo, function(i, val) {
    console.log(val);
});


var foo = ["bar", "test"];
CE.each(2, function(i) {
    console.log(foo[i]);
});

var foo = {bar: "bar", test: "test"};
CE.each(foo, function(i, val) {
    console.log(val);
});

Discussion