F
Fernando Perez
I have the following array:
[ product1, product2, product3 ]
All products are of type Product. The Product class defines isntance
attributes such as: title, description, price.
Can I use include? to check if the array has a product which price is
zero? if not what would I need to do? Iterate over each product and set
a variable if a match is found?
[ product1, product2, product3 ]
All products are of type Product. The Product class defines isntance
attributes such as: title, description, price.
Can I use include? to check if the array has a product which price is
zero? if not what would I need to do? Iterate over each product and set
a variable if a match is found?