wordpair = () => {
const random = max => Math.trunc( Math.random() * (max + 1) )
const maxindex = array => array.length - 1
const first = words[random(maxindex(words))]
const possiblesecond = (
word => (
first.length + word.length === 10
&&
word !== first
)
)
const possibleseconds = words.filter(possiblesecond)
const second = possibleseconds[random(maxindex(possibleseconds))] || ""
const titlecase = word => word[0].toUpperCase() + word.slice(1)
const secondCapped = second[0].toUpperCase() + second.slice(1)
const pair = first + secondCapped
return { pair, first, second }
}