Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Concatenating Strings | Section
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
JavaScript Essentials for Beginners - 1768407374405

bookChallenge: Concatenating Strings

Tâche

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.

  1. Declare and initialize a variable named username with the value "Alice".
  2. Declare and initialize another variable named welcomeMessage that combines the following parts in this exact order:
    • "Hello, "
    • the variable username
    • "! Welcome to our website."
  3. Print (console.log) the contents of welcomeMessage.

Expected output is:

Hello, Alice! Welcome to our website.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 28
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

bookChallenge: Concatenating Strings

Glissez pour afficher le menu

Tâche

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.

  1. Declare and initialize a variable named username with the value "Alice".
  2. Declare and initialize another variable named welcomeMessage that combines the following parts in this exact order:
    • "Hello, "
    • the variable username
    • "! Welcome to our website."
  3. Print (console.log) the contents of welcomeMessage.

Expected output is:

Hello, Alice! Welcome to our website.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 28
single

single

some-alt