evoShop.each( [array ,] callback )

arguments:

  • array (optional): array or object to iterate through. If it is not provided, evoShop will iterate through the objects in the cart
  • callback: function to call with each iteration
  • Iterating through the evoShop objects:

    evoShop.add({name: "Sticker",price: 1});
    evoShop.add({name: "Button",price: 1});
    
    var items = [];
    
    evoShop.each(function( item , x ){
        items.push( item.name );
    });
    
    console.log( items );   // [ "Sticker" , "Button" ]