// You can wrap many instructions into a function
// and create complex logic.
//
// In the end you can return a value...
const identify = () => {
const name = prompt('Type your name:')
const surname = prompt('Type your surname:')
return `${name} ${surname}`
}
// ... so that later on - when you use that function - things look very easy!
const fullname = identify()
alert(`Your full name is: ${fullname}`)
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.