I'm Kirsty, a passionate learner exploring the world of full-stack development. Join me on my journey as I build projects, share knowledge, and grow as a developer.
Can you solve my JavaScript riddle? No pressure... but there's imaginary cookies at stake! 🍪
function kirstyMagic(input) {
// Transform the input into something magical
const sparkles = input.split('').map((char, i) =>
i % 2 === 0 ? char.toUpperCase() : char.toLowerCase()
).join('');
return `✨ ${sparkles} ✨`;
}
// Your task: What does kirstyMagic('hello world') return?
// Type your answer below and check it!