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

bookChallenge: Adding a Comment

Aufgabe

Swipe to start coding

The code from the previous task is given.

In this case we used a mathematical formula inside the statement to calculate the area of a Trapezium. However, looking at the expression, the structure of the formula is not very obvious at first glance. In situations like these it is useful to add a comment so that other people reading the code can know what's going on, or even ourselves in case we revisit this code sometime later.

Add a single-line comment before the console.log statement, containing the following text:

Area of a Trapezium = (a + b) * h / 2

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 11
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

bookChallenge: Adding a Comment

Swipe um das Menü anzuzeigen

Aufgabe

Swipe to start coding

The code from the previous task is given.

In this case we used a mathematical formula inside the statement to calculate the area of a Trapezium. However, looking at the expression, the structure of the formula is not very obvious at first glance. In situations like these it is useful to add a comment so that other people reading the code can know what's going on, or even ourselves in case we revisit this code sometime later.

Add a single-line comment before the console.log statement, containing the following text:

Area of a Trapezium = (a + b) * h / 2

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 11
single

single

some-alt