r/codehs • u/maddie0400 • Jun 23 '22
3.19.10 Longest Paragraph
In this exercise, you are to figure out which paragraph is the longest. In the h3
tag longest
, indicate which of the paragraphs is the longest.
We can determine the length of a paragraph by calling innerHTML.length
on an element. This will return the total number of characters in the element. In order to complete this correctly, you will have to use getElementsByTagName
.
Note: The correct answer for your assignment is different than the correct answer in the example!

5
Upvotes
View all comments
Show parent comment
1
u/xXTillerXx Dec 19 '24
The "Checking your results" test case always seems to fail for some reason - and it doesn't give any indication of why exactly the output doesn't match what's expected. 🤷