title: Trying to capitalize the first character in array of strings, why this is not working?
body: <p>I'm trying to write a function that converts for example <code>list-style-image</code> to <code>listStyleImage</code>.</p>
  <p>I came up with a function but it seems not working. Can anybody point me to the problem here ?</p>
  <pre><code>var myStr = &quot;list-style-image&quot;;
  
  function camelize(str){
      var newStr = &quot;&quot;;    
      var newArr = [];
      if(str.indexOf(&quot;-&quot;) != -1){
          newArr = str.split(&quot;-&quot;);
          for(var i = 1 ; i &lt; newArr.length ; i++){
              newArr[i].charAt(0).toUpperCase();
          }       
          newStr = newArr.join(&quot;&quot;);
      }
      return newStr;
  }
  
  console.log(camelize(myStr));
  </code></pre>