JavaScript Program to Check First Character of Entered String is Uppercase or not Using Regular Expression

Write a JavaScript program to check first character of entered string is uppercase or not using regular expression.

Source Code
    <title>Regular expression - Checking for First letter capital</title>
        function checkUpper(txt)
            var re = /^[A-Z]/

                alert("String's first character is uppercase")
                alert("String's first character is not uppercase")
Enter some text <input type="text" id="txt" onblur="checkUpper(this)"/>