const gengen = (minDots, maxDots, minExcls, maxExcls) => () => { return '하' + '.'.repeat(Math.random() * (maxDots - minDots) + minDots) + ' 백군이형' + '!'.repeat(Math.random() * (maxExcls - minExcls) + minExcls) } const gen = gengen(5, 10, 3, 5) console.log(gen())