We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
functionprocessData(input){//Enter your code hereletwords=input.split('\n').slice(1);for(vari=0;i<words.length;i++){varword=words[i];varevenLetters='';varoddLetters='';for(varj=0;j<word.length;j++){if(j==0||j%2==0){evenLetters+=word[j];}else{oddLetters+=word[j];}}console.log(evenLetters+' '+oddLetters);}}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 6: Let's Review
You are viewing a single comment's thread. Return to all comments →
Here is my JavaScript solution: