Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@RaghuChandrasekaran

This comment has been minimized.

Copy link

@RaghuChandrasekaran RaghuChandrasekaran commented Jul 21, 2016

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