you read it wrong read it again "optimize the code first let's understand my question in easy way step by step
players = World.getPlayers();
for (i = 0; i < players.length; i++) {

    // Get UUID and convert to binary    
    UUID = players[i].getUUID().replace(/-/g, "");
    binUUID = "";
    for (j = 0; j < 32; j++) {
        binUUID += parseInt(UUID[j], 16).toString(2).padStart(4, "0");
    }

    // Check if the relevant bits are correct, otherwise player is a nick
    relevantBits = binUUID[48] + binUUID[49] + binUUID[50] + binUUID[51] + binUUID[64] + binUUID[65];
    if (relevantBits != "010010") {
        // Print nick
        Chat.log(players[i].getName());
    }
}"