Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Adding a Comment | Section
JavaScript Essentials for Beginners - 1768407374405

bookChallenge: Adding a Comment

Taak

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

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 11
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

close

bookChallenge: Adding a Comment

Veeg om het menu te tonen

Taak

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

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 11
single

single

some-alt