function matchesChoice(product,name,userChoice) {
    var productValue = product[name];
    if (userChoice === undefined) return true; // User has not made a choice
    else if (productValue === userChoice) return true;
    else return false;
  }
// This is similar to matchesMetafield(), but for simple name / value string pairs on the product object.
This is similar to matchesMetafield(), but for simple name / value string pairs on the product object.
This is similar to matchesMetafield () but for simple name / value string pairs on the product object .
function matchesChoice(product,name,userChoice) {
    var productValue = product[name];
    if (userChoice === undefined) return true; 
    else if (productValue === userChoice) return true;
    else return false;
  }
function matchesChoice ( product , name , userChoice ) { var productValue = product [ name ] ; if ( userChoice === undefined ) return true ; else if ( productValue === userChoice ) return true ; else return false ; }
This is similar to matchesMetafield(), but for simple name / value string pairs on the product object.
This is similar to matchesMetafield () but for simple name / value string pairs on the product object .
// User has not made a choice