Last active
September 11, 2023 15:14
-
-
Save codeperfectplus/23bf9eb1db1681521259fb483eaa9643 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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