Skip to content

Instantly share code, notes, and snippets.

@codeperfectplus
Last active September 11, 2023 15:14
Show Gist options
  • Select an option

  • Save codeperfectplus/23bf9eb1db1681521259fb483eaa9643 to your computer and use it in GitHub Desktop.

Select an option

Save codeperfectplus/23bf9eb1db1681521259fb483eaa9643 to your computer and use it in GitHub Desktop.
function processData(input) {
//Enter your code here
input = input.split('\n')
for(let i=1;i<input.length;i++){
var splitWord = input[i].split('');
var even = '';
var odd = '';
for(x=0;x<splitWord.length;x++){
if(x%2==0){
even = even + splitWord[x];
}else{
odd = odd +splitWord[x];
}
}
console.log(even + ' '+ odd);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment