function personalTouch(task: string, mood: string = 'neutral'): string {
/**
* A function to add a personal touch for Aldi Krasniqi.
*
* Args:
* - task (string): The task to execute.
* - mood (string): Your current mood. Default is 'neutral'.
*
* Returns:
* - string: A personalized message with some fun elements.
*/
const funEmojis: { [key: string]: string } = {
'happy': '😄',
'neutral': '😐',
'frustrated': '😤'
};
const personalAdvice: { [key: string]: string } = {
'happy': "Fantastic! Keep that spirit up while you code.",
'neutral': "Maintain your balance, whether it's coding or biking downhill.",
'frustrated': "Take a break, maybe play a game of League of Legends or go fishing."
};
if (!(mood in funEmojis)) {
return "Invalid mood! Please choose between 'happy', 'neutral', or 'frustrated'.";
}
return `Task to complete: ${task} ${funEmojis[mood]}. Advice: ${personalAdvice[mood]}`;
}
const message: string = personalTouch("Optimize the JavaScript performance", "happy");
console.log(message);
aldikrasniqi Goto Github PK
Name: Aldi Krasniqi
Type: User
Company: Stree LLC
Bio: I Craft Dope UI's
Blog: aldikrasniqi.tech