Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong test case/question in 06-title-case #24

Open
jsuryakt opened this issue Feb 21, 2024 · 0 comments
Open

Wrong test case/question in 06-title-case #24

jsuryakt opened this issue Feb 21, 2024 · 0 comments

Comments

@jsuryakt
Copy link

jsuryakt commented Feb 21, 2024

https://github.com/bradtraversy/traversy-js-challenges/tree/main/01-basic-challenges-1/06-title-case

In the examples

titleCase("I'm a little tea pot"); // I'm A Little Tea Pot
titleCase('sHoRt AnD sToUt'); // Short And Stout
titleCase('HERE IS MY HANDLE HERE IS MY SPOUT'); // Here Is My Handle Here Is My Spout

It shows that we need to convert the first letter of each word to UpperCase and the rest to LowerCase.

https://github.com/bradtraversy/traversy-js-challenges/blob/main/01-basic-challenges-1/06-title-case/readme.md#solutions
In the first solution as well it is clearly converted toLowerCase

But in the second solution, only the first character is converted to upper case and rest remains the same.

So either the question and test-cases are wrong, or the examples and Solution 1 is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant