DEV Community

loading...

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

Brittany
Software Engineer ๐Ÿ‘ฉ๐Ÿพโ€๐Ÿ’ป | Determined | Music & Dance | Completed #100DaysofCode | #WomenWhoCode |MLH Grad
ใƒป1 min read

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.

Discussion (0)