Created
April 24, 2020 13:02
-
-
Save edieblu/a06e42a0fb8426baec50685ba98cd4f2 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
const text = 'Hi team :wave ! Espen , Jon and Eva are thrilled to have you back and working with us . VIBBIO 4ever :heart !' | |
const chopped = text.split(" ") | |
const Espen = [] // [ 'Hi', '!', 'Jon', 'are', 'have', 'and', 'us', '4ever' ] | |
const Jon = [] // [ 'team', 'Espen', 'and', 'thrilled', 'you', 'working', '.', ':heart' ] | |
const Eva = [] // [ ':wave', ',', 'Eva', 'to', 'back', 'with', 'VIBBIO', '!' ] | |
for (let i = 0; i < chopped.length; i+=3) { | |
Espen.push(chopped[i]) | |
Jon.push(chopped[i+1]) | |
Eva.push(chopped[i+2]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment