/**
* @const
* @type {!storeLocator.FeatureSet}
* @type {!storeLocator.FeatureSet}
* @private
*/
MedicareDataSource.prototype.FEATURES_ = new storeLocator.FeatureSet(
new storeLocator.Feature('Wheelchair-YES', 'Shoe1'),
new storeLocator.Feature('Audio-YES', 'Shoe2')
);
/**
* @return {!storeLocator.FeatureSet}
*/
MedicareDataSource.prototype.getFeatures = function() {
return this.FEATURES_;
};
每次我在Audio-YES
行之后添加一行代码,输出会在我的程序中消失?有什么问题?
答案 0 :(得分:0)
您无法在new storeLocator.Feature('Audio-YES', 'Shoe2')
之后立即添加代码。剧情:
storeLocator.FeatureSet
是构造函数,不在那里编写代码,传递参数,用逗号分隔。
答案 1 :(得分:0)
也许您在插入新行之前忘记添加,
:
MedicareDataSource.prototype.FEATURES_ = new storeLocator.FeatureSet(
new storeLocator.Feature('Wheelchair-YES', 'Shoe1'),
new storeLocator.Feature('Audio-YES', 'Shoe2'), // don't forget the comma
new storeLocator.Feature('something', 'else')
);