• + 0 comments

    Js solution

    function pangrams(s) {
        return isPangram(s.toLowerCase()) ? "pangram" : "not pangram"
    }
    const pangramRegex = /^(?=.*a)(?=.*b)(?=.*c)(?=.*d)(?=.*e)(?=.*f)(?=.*g)(?=.*h)(?=.*i)(?=.*j)(?=.*k)(?=.*l)(?=.*m)(?=.*n)(?=.*o)(?=.*p)(?=.*q)(?=.*r)(?=.*s)(?=.*t)(?=.*u)(?=.*v)(?=.*w)(?=.*x)(?=.*y)(?=.*z).*$/
    
    const isPangram = (str) => pangramRegex.test(str);