memoscan
← all memos

Memo 0x0e34719b…346fb2 on Ethereum

const infiniteLibrary = async () => { // Define the character set const asciiChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 .,!?"-\\''; const emojis = '😀😂🤣😊😍🥰😎'; const symbols = '€$<>[]{}()'; const allChars = asciiChars + emojis + symbols; const generateChar = () => allChars[Math.floor(Math.random() * allChars.length)]; const mineWisdom = async (desiredWisdom) => { let universe = ""; while (true) { // Generate a character from our defined set const newChar = generateChar(); universe += newChar; // Log the entire universe after each character console.clear(); console.log(universe); if (universe.endsWith(desiredWisdom)) { console.log("\\ntokens explored: " + universe.length); return; } } }; const desiredWisdom = await prompt("What are you looking for?"); await mineWisdom(desiredWisdom); }; infiniteLibrary();