Zalgoifier

by Scott Kaye

JavaScript

const zalgo = text => {
	const z = () => `&#${(Math.random() * 110 + 768) | 0};`;
	const zs = () =>
		Array((Math.random() * 5) | 0)
			.fill(0)
			.map(z)
			.join("");
	return ("" + text).replace(/\w/g, match => zs() + match + zs());
};

document.write(zalgo("To invoke the hive-mind representing chaos."));