Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Outputing Multiple Lines | Getting Started
Introduction to JavaScript

Swipe to show menu

book
Challenge: Outputing Multiple Lines

Task

Swipe to start coding

Display a short poem in the console. The poem consists of multiple lines, and each line should be displayed individually. Here's an example of what it should look like:

Roses are red,
Violets are blue,
Learning to code
Is fun to do!

Display output in the console, exactly as shown above.

Note

Make sure there are no extra spaces at the end of each line.

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Β 1. ChapterΒ 3
single

single

Ask AI

expand

Ask AI

ChatGPT

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

close

Awesome!

Completion rate improved to 1.33

book
Challenge: Outputing Multiple Lines

Task

Swipe to start coding

Display a short poem in the console. The poem consists of multiple lines, and each line should be displayed individually. Here's an example of what it should look like:

Roses are red,
Violets are blue,
Learning to code
Is fun to do!

Display output in the console, exactly as shown above.

Note

Make sure there are no extra spaces at the end of each line.

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!

close

Awesome!

Completion rate improved to 1.33

Swipe to show menu

some-alt