Nonsense Words Golfed
vow = 'aeiou'.split``
con = 'bcdfghjklmnpqrstvwxyz'.split``
R = _ => Math.random()
r = a => a[~~(R() * a.length)]
part = _ => r(con) + r(vow) + (
R() < .5 ? r(vow) : ''
)
wrd = _ => {
n = ~~(R() * 3) + 1
s = ''
for (i = n; i--;)
s += part()
return s + ' '
}
for(k = 30; k--;)
document.body.innerHTML += wrd()
Some nonsense words…