JavaScript Algorithm: Convert String to Camel Case
Convert dash and or underscore delimited words into camel casing
Published in
3 min readJan 10, 2022
We are going to write a function called toCamelCase()
that will accept a string, str
, as an argument.
For this function, you are given a string and the words in the string are separated by either a dash —
or an underscore _
or both. The goal of…