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 need to combine (join) multiple strings to create a full greeting message.
- Declare & initialize a variable called
username
with"Alice"
. - Declare & initialize another variable called
welcomeMessage
which contains the concatenation of the following three in order:"Hello, "
,username
,! Welcome to our website.
. - Output the contents of
welcomeMessage
.
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
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 need to combine (join) multiple strings to create a full greeting message.
- Declare & initialize a variable called
username
with"Alice"
. - Declare & initialize another variable called
welcomeMessage
which contains the concatenation of the following three in order:"Hello, "
,username
,! Welcome to our website.
. - Output the contents of
welcomeMessage
.
Solution
Everything was clear?
Thanks for your feedback!
Awesome!
Completion rate improved to 1.33SectionΒ 2. ChapterΒ 14
single