Skip to content

Instantly share code, notes, and snippets.

@Javiani
Created July 21, 2019 01:00
Show Gist options
  • Save Javiani/a444bf143064d21521acb98aa264adc7 to your computer and use it in GitHub Desktop.
Save Javiani/a444bf143064d21521acb98aa264adc7 to your computer and use it in GitHub Desktop.
Snippets for Medium
const fullname = firstname
.then( fname => middleName.then( mname => `${fname} ${mname}`) )
.then( name => lastname.then( lname => `${name} ${lname}` ) )
fullname.then( name => console.log( name ) )
// 'Marcus Geoffrey Johnson'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment