INNER CODE UNIT · JavaScript

randomPosition

jofpin/temcrypt · temcrypt.js:256

            let randomPosition = composition.filter(elem => {
                if (noRepeat.has(elem)) {
                    return false;
                } else {
                    noRepeat.add(elem);
                    return true;
                }
            });
            return this.shuffle(randomPosition);
        },
        hexGenerator: function(length) {
            const charactersHex = "0123456789abcdef";
            let value = "";
            for (let i = 0; i < length; i++) {
                value += charactersHex.charAt(Math.floor(Math.random() * charactersHex.length));
            }
            return value;
        },

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…