Skip to content

Instantly share code, notes, and snippets.

@syeo66
Last active May 11, 2019 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syeo66/e33320349870923800ffaf25226c923d to your computer and use it in GitHub Desktop.
Save syeo66/e33320349870923800ffaf25226c923d to your computer and use it in GitHub Desktop.
using map to fill an array
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