Function isAlphaNum

  • Check that a string only consists of alphanumeric characters.

        isAlphaNum("abcdefghijklmnopqrstuvxyz") => true
    isAlphaNum("ABCDEFGHIJKLMNOPQRSTUVXYZ") => true
    isAlphaNum("1234567890") => true
    isAlphaNum("=") => false

    Returns

    true if it only contains alphanumeric characters.

    Parameters

    • string: string

      the string of characters

    Returns boolean