Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Accessing Data From a Variable | Manipulating Data
Introduction to JavaScript
Sectionย 2. Chapterย 3
single

single

bookChallenge: Accessing Data From a Variable

Swipe to show menu

Task

Swipe to start coding

Create the following variables:

  • firstName with value "Alice".
  • lastName with value "Johnson".
  • age with value 25.

Using these variables, generate the following output:

User: Alice Johnson is 25 years old.

Make sure you use the variable values inside the output instead of hardcoding the text.

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ย 3
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt