JSFiddle - React, Tailwind, and code Playground

by Diana Lemen

JavaScript

function greeting(name) {
 return function(surname) {return surname + ' ' +name}
}

const call = greeting('diana');
console.log(call('lemen'));
console.log(call('notLemen'));