Skip to content

Instantly share code, notes, and snippets.

@Nasah-Kuma
Created October 6, 2022 11:56
Show Gist options
  • 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