DEV Community

Brittany
Brittany

Posted on

2 2

Day 94 : #100DaysofCode - A Video And A Challenge

Today I watched a piece of the JavaScript: Understanding the Weird Parts video on youtube.

Complete the solution so that the function will break up camel casing, using a space between words.

The solution that would be ("camelCasing") == "camel Casing"

I came up with the following solution:

def solution(string)
  s = string.split /(?=[A-Z])/
  s.join(' ')
end
Enter fullscreen mode Exit fullscreen mode

I hope to start practicing code challenges with javascript.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay