MTSU uses course specifications like CSCI 4410-001. Here is a partial list of syntax rules for a MTSU course specification:
 It starts with from 2 to 4 uppercase letters
 Next comes a space
 Next comes a 4-digit number
 Next comes a hyphen (-)
 Next comes a section number which is either a 3 digit number, or the letter H or L followed by a two digit number
Write a JavaScript function isCourse with one parameter, a string. It will return true if the string represents a MTSU course specification according to the above rules and false otherwise. You must use pattern matching appropriately. To test this function, write a simple HTML file containing a text box that will receive the course name and a submit button. On submit, the isCourse function should be used to determine whether the course is valid or not with an appropriate message in either case.

Can you please write code explanation to make me understand it better. Thanks