Well since it's the first.. Why not make it a simple one. This snippet will test to make sure that a said variable contains only alphabetic characters.
Instructions: Well there are many different ways in which you can use regular expressions with JavaScript, you can learn more about them at
www.regular-expressions.info/
Here we're just going to test a variable to make sure that it only contains alphabetic characters, using the 'test' method. For instance, some type of 'Name' field.