Challenge: Concatenating Strings
Uppgift
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.
Expected output is:
Hello, Alice! Welcome to our website.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 28
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Fantastiskt!
Completion betyg förbättrat till 1.33
Challenge: Concatenating Strings
Svep för att visa menyn
Uppgift
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.
Expected output is:
Hello, Alice! Welcome to our website.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 28
single