const jonas = {
  firstName: "Jonas",
  lastName: "Schmedtmann",
  age: 2037 - 1986,
  job: "developer",
  friends: ["Nika", "Joanne", "Eva"],
};
const nameKey = "Name";
console.log(jonas.firstName);
console.log(jonas["first" + nameKey]);
console.log(jonas["last" + nameKey]);

const interestedIn = prompt(
  "What do you want to know about Jonas? (firstName, lastName, age, job, friends)"
);
jonas.location = "Vienna";
jonas["twitter"] = "SynTax64";

if (jonas[interestedIn]) {
  console.log(jonas[interestedIn]);
} else {
  console.log("Wrong request!");
}

console.log(
  `${jonas.firstName} has ${jonas.friends.length} friends and his best friend is called ${jonas.friends[0]}`
);
