Skip to content

Conversation

@Pranayee35
Copy link

This update improves the existing greet() function by handling cases where the user does not enter a name or cancels the prompt.

If the input is empty or null, a message "You didn't enter your name!" is shown.

If a valid name is entered, it displays a friendly greeting using template literals.

This makes the function more user-friendly and prevents undefined or blank outputs in the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant