printusername
v1.1.0
Published
A simple module to create print
Downloads
9
Readme
WelcomeUser Function 🚀
Overview
welcomeUser is a simple yet effective JavaScript function designed to greet users dynamically. It takes a userName as input and logs a personalized welcome message to the console. If no name is provided, it gracefully defaults to an empty string.
How It Works
const welcomeUser = (userName = "") => {
console.log(`Welcome, ${userName}`);
};
welcomeUser("Vishnu"); // Output: Welcome, Vishnu
welcomeUser(); // Output: Welcome, Key Features 🔥
- Dynamically generates a personalized welcome message.
- Supports an optional
userNameparameter. - Uses modern ES6 template literals for enhanced readability.
- Lightweight and highly reusable function.
System Requirements 📌
- Any JavaScript runtime (Browser Console or Node.js)
Why Use This? 💡
- Perfect for beginner-friendly JavaScript projects.
- Can be integrated into larger applications requiring user interaction.
- Enhances user experience with minimal code.
About the Author ✨
Developed by Vishnu Singh, a passionate Software Engineer dedicated to creating intuitive and efficient code solutions.
License 📜
Feel free to use and modify this function as needed. Happy coding! 🚀
