DEV Community

loading...

Discussion on: Daily Challenge #95 - CamelCase Method

Collapse
opensussex profile image
gholden
  const camelcase = (stringToConvert) => {
    const stringArray = stringToConvert.trim().split(" ")
    const camel =  stringArray.map(indie => {
      return indie[0].toUpperCase() + indie.slice(1)
    })
    return camel.join('');
  }
Forem Open with the Forem app