@thor For example:
function randomStr(l) {
// 生成する文字列に含める文字セット
var c = 'abcdefghijklmnopqrstuvwxyz0123456789'
var cl = c.length
var r = ''
for (var i = 0; i < l; i++) {
r += c[Math.floor(Math.random() * cl)]
}
return r
}

This is being used to generate "unique" IDs. I think for CSS shenanigans.

Follow

@wilmhit Hey, technically, they're named.
But also this isn't my code. My code tends to look worse than this.

Sign in to participate in the conversation
Mastodon

A Mastodon instance for everyone.