JSFiddle - React, Tailwind, and code Playground
JavaScript
var peter = {name:"Peter", age:"23", sex:"Male", country:"Russia", position:"Manager"};
var mark = {name:"Mark", age:"21", sex:"Male", country:"US", position:"Designer"};
var jessica = {name:"Jessica", age:"19", sex:"Female", country:"UK", position:"Programmer"};
function showDetailsInLog(){
console.log("Employee Name: " + this.name);
console.log("Employee Age: " + this.age);
console.log("Employee Sex: " + this.sex);
console.log("Employee Country: " + this.country);
console.log("Employee Position: " + this.position);
console.log("-----------------------");
}
peter.logInfo = showDetailsInLog;
mark.logInfo = showDetailsInLog;
jessica.logInfo = showDetailsInLog;
peter.logInfo();
mark.logInfo();
jessica.logInfo();