Last active
May 11, 2019 06:59
-
-
Save syeo66/e33320349870923800ffaf25226c923d to your computer and use it in GitHub Desktop.
using map to fill an array
This file contains 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 encode = data => { | |
const encoded = []; | |
data.split('').map(c => encoded.push(c.toUpperCase())); | |
return encoded; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment