Challenge: Concatenating Strings
Opgave
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 alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 28
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Fantastisk!
Completion rate forbedret til 1.33
Challenge: Concatenating Strings
Stryg for at vise menuen
Opgave
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 alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 28
single