DEV Community

Discussion on: Daily Challenge #95 - CamelCase Method

Collapse
 
balajik profile image
Balaji K

Nice one liner :). But if s is an empty string, then str[0] will be undefined and toUpperCase will throw an error.

Collapse
 
jacobmgevans profile image
Jacob Evans

It's not about finding edge cases. This is a great solution for a coding challenge... Most coding challenges are things you'd put in production anyways