console.log(camelize("JavaScript Exercises"));
console.log(camelize("JavaScript exercises"));
console.log(camelize("Java Script"));
console.log(camelize("Java c"));
function camelize(str)
{
    var temp = str.split('');
    var arr = []
    for(var i =0 ; i<temp.length ; i++)
    {
       if(i==0)
        {
            arr.push(temp[i].toLowerCase());
            continue
         }
        else if(temp[i] == ' ')
        {
           arr.push(temp[i]);
           arr.push(temp[i+1].toUpperCase());
           i++; continue
        }
         arr.push(temp[i]);
    }
    return arr.join('')
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: