Why does this piece of code give me a error "Uncaught TypeError: Cannot set property 'grossSuperAnnuation' of undefined "? Thanks.
function taxCalculation(configuration){
this.superAnnuationPercentage = configuration.superAnnuationPercentage;
this.superAnnuationTaxRate = configuration.superAnnuationTaxRate;
};
var tax = new taxCalculation({
superAnnuationPercentage: 9.25,
superAnnuationTaxRate: 15
});
tax.prototype.grossSuperAnnuation = function(income){
return income * this.superAnnuationPercentage / 100;
};