scrimba
Frontend Career Path
Getting hired
JavaScript Interview Challenges
Challenge - Alternating Caps
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

AboutCommentsNotes
Challenge - Alternating Caps
Expand for more info
index.js
run
preview
console
/* Alternating Caps 
Write a function that takes in a string of letters
and returns a sentence in which every other letter is capitalized.

Example input: "I'm so happy it's Monday"
Example output: "I'M So hApPy iT'S MoNdAy"
*/

function altCaps(str){
return newStr;
}

console.log(altCaps("When you visit Portland you have to go to VooDoo Donuts"));
Console
ReferenceError: mock is not defined (/index.js:22)
,
/index.html
-0:53