Created
March 7, 2017 02:58
-
-
Save roneesh/310c39f82db09def89c1fd98e4364e40 to your computer and use it in GitHub Desktop.
An example of properly formatted code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function underToCamel(underName) { | |
var camelCaseOutput = ""; | |
var foundunder = false; | |
for( var i = 0; i < undername.length; i++) { | |
// undername[i]; | |
if (undername[i] === "_") { | |
foundunder = true; | |
} else { | |
if (foundunder) { | |
camelcaseoutput += undername[i].toUpperCase(); | |
foundunder = false; | |
} else { | |
camelcaseoutput += undername[i]; | |
} | |
} | |
} | |
return camelCaseOutput; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment