Full-Stack Developer
type Activity = 'Work' | 'Sleep';
const myDay = (): void => { let coffeeCount: number = 0; const drinkCoffee = () => coffeeCount += 2; const workHours: number = 8; const lunchBreak = () => console.log("Lunch break!"); const dinner = () => console.log("Dinner time!"); const randomDecision: Activity = Math.random() > 0.5 ? 'Work' : 'Sleep';
const logActivity = (activity: string, hours?: number) => console.log(`Activity: ${activity}${hours ? ` for ${hours} hours` : ''}.`);
drinkCoffee(); logActivity('Drank coffee', coffeeCount); logActivity('Work', workHours / 2); lunchBreak(); logActivity('Work', workHours / 2); dinner();
randomDecision === 'Work' ? logActivity('Work', 6) : logActivity('Sleep', Math.floor(Math.random() * (3) + 6));};
myDay();
Commits
Projects
Caffè
Favorite number
+39 393 135 0744
fra@scassius.com
Milan, Italy