DEV Community

Discussion on: Daily Challenge #95 - CamelCase Method

Collapse
 
kvharish profile image
K.V.Harish

My solution in js

const camelCase = (words = '') => words.split(' ')
                                       .map(word => `${word.charAt(0).toUpperCase()}${word.slice(1).toLowerCase()}`)
                                       .join('');