を定義していない私は持って次のコード:JavaScript変数エラー
// Get combination prices
var combID = $('#idCombination').val();
var combinationsFromController;
var combination = combinationsFromController[combID];
if (typeof combination === 'undefined')
return;
// Set product (not the combination) base price
var basePriceWithoutTax = +productPriceTaxExcluded;
var basePriceWithTax = +productPriceTaxIncluded;
var priceWithGroupReductionWithoutTax = 0;
私はそれを実行し、クローム常に苦情:
はcombinationsFromController is not defined.
は、誰もがこの出来事はなぜ私を助けることができますか?
私が試した:運と
var combinationsFromController = new Array();
var combination = combinationsFromController[combID];
を。
'not defined.'を返す必要があります。何を返すと思いますか? – mehulmpt