Kata for Javascript: Converting a Python variable name to Camel Case for Javascript. #3130
Closed
JeffGreenlee42
started this conversation in
General
Replies: 2 comments
-
Yeah that kata is misnamed, nothing we can do about it now though as far as I know. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ok , got it! (Sigh!). My solution is rather more inelegant than some of
the other solutions. Didn’t think to use regular expression! 🤨
Jeff Greenlee
"Music is a higher revelation than all wisdom and philosophy. Music is the
electrical soil in which the spirit lives, thinks and invents."
Ludwig Van Beethoven
…On Tue, Dec 26, 2023 at 6:09 PM Kayleigh ***@***.***> wrote:
Yeah that kata is misnamed, nothing we can do about it now though as far
as I know.
—
Reply to this email directly, view it on GitHub
<#3130 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFMJ6XJYF73QYDTFWOFGUK3YLN7O7AVCNFSM6AAAAABBDZEFHGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TSNJSGYZDK>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm just posting a question here. I just finished the Kata exercise "Convert string to Camel Case". I failed the test because it produced this error:
"toCamelCase('The-Stealth-Warrior') did not return correct value: expected 'the-stealth-warrior' to equal 'TheStealthWarrior'"
But my understanding of the Javascript convention of camel case is that the first word must start with a lowercase letter? The exception is if one were converting a string to Pascal case. So I added an if statement to my algorithm to treat the first word differently than the rest.
Am I misinformed?
Beta Was this translation helpful? Give feedback.
All reactions