Ad
  • Custom User Avatar

    You may be right, but I like to avoid boilerplate whenever possible. In my opinion it enhances readability to use situational syntactic sugar like this: because it can only be used in certain circumstances, its use highlights that you are in those circumstances.

  • Custom User Avatar

    You're adding an empty string between the words, if the answer is "camel Casing", you are returning "camelCasing". But more importantly, this only solves the case of single word inputs or the input "camelCasing". You need to solve the general case so that it also handles "fooBar", "thisWordHere", and whatever else the user enters.

  • Custom User Avatar

    I timed out as well with this same solution. How did this one pass I wonder?

  • Custom User Avatar

    Perfectly servicable and efficient. Wouldn't best practices encourage adding a return line? Obviously not necessary for such simple code.