Constructor
JavaScript
function NumberParser (countryCodes){
this.internationalize = function (a,b) {
console.log(...countryCodes, a, b);
}
}
const parser = new NumberParser([1,2,3]);
parser.internationalize('Hello', 'World');
function NumberParser (countryCodes){
this.internationalize = function (a,b) {
console.log(...countryCodes, a, b);
}
}
const parser = new NumberParser([1,2,3]);
parser.internationalize('Hello', 'World');