Skip to content

Instantly share code, notes, and snippets.

@Nasah-Kuma
Created October 6, 2022 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nasah-Kuma/28266553978bb39e0d6b863299e29bd1 to your computer and use it in GitHub Desktop.
Save Nasah-Kuma/28266553978bb39e0d6b863299e29bd1 to your computer and use it in GitHub Desktop.
function camelcase(s) {
// Write your code here
let wordCount = 1;
let i = 0;
while (i < s.length) {
if(s[i].toUpperCase() === s[i]) wordCount++;
i++;
}
return wordCount;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment