Challenge: Adding a Comment
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
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 1.33
Challenge: Adding a Comment
Свайпніть щоб показати меню
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
Рішення
Дякуємо за ваш відгук!
single