Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Task - Concatenating Strings | Manipulating Data
Introduction to JavaScript
course content

Course Content

Introduction to JavaScript

Introduction to JavaScript

1. Getting Started
2. Manipulating Data
3. Conditional Statements

book
Task - 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.

Your task is to:

  • 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

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 14
toggle bottom row

book
Task - 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.

Your task is to:

  • 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

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 14
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt