Assessment wanted for Strings tasks

Hello! Need assessment for Strings tasks.

Codepen:

In task 3 i left a quote about green eggs and ham in fixedQuote to see both quotes on the page.

And in task 4 i wrote a*a and b*b because that is a little bit shorter than a**2 and b**2 :smiley:.

Hello @VladimirK

Great work on this tasks. Everything works as intended. :+1:

  • Task 1: Nice addition of the citation source.
  • Task 2: The pen is titled “Math: Task 2” if you want to change that for your archives :wink:
  • Additional question for Task 3: You took advantage of the fact that the first letter was already uppercase. What would be a general solution if you don’t now the case of the first letter of the input string?

Have a nice day,
Michael

2 Likes

Thank you @mikoMK!

Task 2 : edited.

Task 3: something like this:

const quote = ‘i dO nOT lIke gREen eGgS anD HAM’;
const fixedQuote = quote.slice(0,1).toUpperCase() + quote.slice(1).toLowerCase();

2 Likes

You’re welcome!
Yes, that was exactly what I was looking for. Good job!

1 Like