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