yok558
1/14/2018 - 6:31 PM

Udacity

Iterating with Each Quiz 19-12

/*
For this quiz, use jQuery's each() method to iterate through the <p>s,
calculate the length of each one, and add each length to the end of each <p>.

Also, make sure you don't change the text inside each <p> except to add the length, otherwise your
length numbers won't be correct!
*/

$( "p" ).each(function() {
  var plength = $(this).text().length;
  $(this).append(plength);
});