Module:DidYouKnow

local p = {}

local data = mw.loadData("Module:DidYouKnow/data")

function p.retrieve local itemsToRetrieve = 5 local data2 = {} local dataLength = 0 for k,v in pairs(data) do       dataLength = dataLength + 1 end math.randomseed(os.time) local random = math.random for i = 1, dataLength do       local offset = i - 1 local value = data[i] local randomIndex = offset*random local flooredIndex = randomIndex - randomIndex%1 if flooredIndex == offset then data2[i] = value else data2[i] = data2[flooredIndex + 1] data2[flooredIndex + 1] = value end end local result = "" for i = 1, itemsToRetrieve do       result = result .. "" .. data2[i] .. "" end result = "" .. result .. "" return result end

return p