Challenge: Concatenating Strings
Task
Swipe to start coding
You're building a welcome message system for a website that greets users by their name. To do this, you'll combine multiple strings into one complete message.
- Declare and initialize a variable named
usernamewith the value"Alice". - Declare and initialize another variable named
welcomeMessagethat combines the following parts in this exact order:"Hello, "- the variable
username "! Welcome to our website."
- Print (
console.log) the contents ofwelcomeMessage.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 14
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain that in simpler terms?
What are the main benefits of this approach?
Are there any common mistakes to avoid with this?
Awesome!
Completion rate improved to 1.33
Challenge: Concatenating Strings
Swipe to show menu
Task
Swipe to start coding
You're building a welcome message system for a website that greets users by their name. To do this, you'll combine multiple strings into one complete message.
- Declare and initialize a variable named
usernamewith the value"Alice". - Declare and initialize another variable named
welcomeMessagethat combines the following parts in this exact order:"Hello, "- the variable
username "! Welcome to our website."
- Print (
console.log) the contents ofwelcomeMessage.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 14
single