// Typescript version
const calculateAge = (birthdate: string): number => {
const birthdateDate = new Date(birthdate);
const currentDate = new Date();
const ageInMilliseconds = currentDate - birthdateDate;
const ageInYears = ageInMilliseconds / (1000 * 60 * 60 * 24 * 365.25);
return Math.floor(ageInYears);
};
const myResume = (): void => {
const name: string = 'Rodrigo Stuani';
const birthday: string = '1988-06-22T12:05:00';
const from: string = 'Brazil';
const age: number = calculateAge(birthday);
let level: string = 'Software Developer';
let job: string = 'Sesc-SC';
let currentStudy: string = 'Clean Code e Clean Architecture';
const social: { network: { name: string } }[] = [{
network: {
name: "https://www.linkedin.com/in/rodrigo-stuani/"
}
}];
console.log(`Hello, my name is ${name}. I'm ${age} years old and I'm from ${from}.
I work as a ${level} at ${job} and currently I'm studying ${currentStudy}.
You can find me on LinkedIn at ${social[0].network.name}.`);
};
myResume();
rodrigostuani Goto Github PK
Name: Rodrigo Stuani
Type: User
Company: Sesc-SC
Bio: Software Developer
Location: Florianópolis, SC - Brasil