hasValue

API - useful for checking if an array contains a value

return function
    local values = { 'word1', 'word2', 'word3'};
    
    local test = helper.hasValue(values, 'word1');
    
    if test == true then
        log('values does contain word1');
    else
        log('values does not contain word1');
    end

end

Last updated