I'm having a problem with a window level variable.
When I save data in that variable and try to read that data from it, it gives me undefined.
The following is the code:
window.cart;
function save(name, sku)
{
window.cart = "sku: "+sku+", nombre: "+name;
};
function read()
{
console.log(window.cart);
}