i’m having trouble capitalizing the first letter of a blockquote

The blockquote variable is an HTML element, not a string. First, get it’s textContent and call substr on it. You also need to set its text content to your result.

blockquote.textContent = blockquote.textContent.substr(0,1).toUpperCase()+blockquote.textContent.substr(1);

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top