Skip to content

Instantly share code, notes, and snippets.

Last active October 22, 2018 23:55
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kbk0125/b7c47770d4c7baf27a0ca3427b2b8957 to your computer and use it in GitHub Desktop.
function packBox(item){
console.log('Put ' +item+ ' in the box');
function addressPackage(address){
console.log('Addressed the box to ' +address+' and ready to send the '+item+' gift');
return addressPackage;
let brotherGift= packBox('jersey')
brotherGift('123 Main Street, Anywhere USA 012345')
//Put jersey in the box
// Addressed the box to 123 Main Street, Anywhere USA 012345 and ready to send the jersey gift
Copy link

Hi Kevin,
Great article 👍
A little bit of ES2015 magic.

console.log('Put ' +item+ ' in the box');

Can be

console.log(`Put  ${item} in the box`);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment