//console.log(uncamelize('helloWorld'));
console.log(uncamelize('helloWorld','-'));
//console.log(uncamelize('helloWorld','_'));
function uncamelize(str,char)
{
var temp = str.split('');
//console.log(temp);
var ar = []
for(var i =0 ; i<=temp.length ; i++)
{
if(temp[i] === 'W')
{
temp[i] = char;
}
ar.push(temp[i]);
}
return ar
}
To embed this program on your website, copy the following code and paste it into your website's HTML: