I'm trying to take a users text and change it to something else. I just dont fully understand the $eval() stuff. Here is what I have:
($eval var stringToAlter = 'test';var stringArray = stringToAlter.split('');varalteredString;stringToAlter.forEach(s => { if (s % 2 === 0) { alteredString = alteredString +s.toLowerCase(); } else { alteredString = alteredString + s.toUpperCase(); }});)
I'm trying to take the text and make every other word a capital letter to emulate the spongebob meme.
Thanks for any help!