Alert shows undefine when passed object

Alert takes string as an input paramter. We need to stringify our object.

Example:


let salaries = {  
  John: 100,  
  Ann: 160,  
  Pete: 130  
};MultiplyNumeric(salaries);function MultiplyNumeric(obj) {  
  for (let key in obj) {  
    if (obj.hasOwnProperty(key)) {  
      obj[key] *= 2;    }  
  }  
}alert(JSON.stringify(salaries));