//12.1.1--Calculate the total annual income of the person from the following text.
//‘He earns 4000 euro from salary per month,
//10000 euro annual bonus, 5500 euro online courses per month.’
let txt="He earns 4000 euro from salary per month, 10000 euro annual bonus, 5500 euro online courses per month."
let s= /\d+/g; // \d=contains digit ,+=1 or more times
let salary=txt.match(s);
console.log(salary);
var total=0;
var a=salary.forEach((d)=>{
total=total+(parseInt(d));
})
console.log(total);
//12.1.1--Calculate the total annual income of the person from the following text. //‘He earns 4000 euro from salary per month, //10000 euro annual bonus, 5500 euro online courses per month.’