My code is passing every other test but it doesn’t pass this: If character count is greater than or equal to 50, the extra input should be trimmed. And I don’t know why
All this line of code is doing is removing white space from the beginning and end of the text in the textarea element; it is not deleting characters that exceed the maximum length of 50 characters.
Good point! And para isn’t referencing the text in the text area anyway.
Did you overlook this instruction not to use the maxlength attribute? And would this work to limit the number of characters to 50 if the full text is pasted into the textbox?
NOTE: While the maxlength attribute would achieve the correct functionality, this lab requires a JavaScript only solution.