interface Profile {
name: string;
role: string;
age: string;
experience: string;
education: {
school: string;
jurusan: string;
};
}
function introduceYourself(profile: Profile): string {
const intro = `Hi, my name is ${profile.name}. I am a ${profile.role}.`;
const details = `I am ${profile.age} years old with ${profile.experience} of experience.`;
const edu = `I studied ${profile.education.jurusan} at ${profile.education.school}.`;
return `${intro}\n${details}\n${edu}`;
}
const developer: Profile = {
name: "Reza Adi",
role: "Frontend Developer",
age: "16 years old",
experience: "2 months",
education: {
school: "SMK Negeri 5 Surakarta",
jurusan: "PPLG (Pengembangan Perangkat Lunak dan Gim)"
}
};
console.log(introduceYourself(developer));
ryznoxy / astro-porto Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://astro-porto-rouge.vercel.app