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

bookChallenge: Adding a Comment

Tarefa

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

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 11
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Adding a Comment

Deslize para mostrar o menu

Tarefa

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

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 11
single

single

some-alt