illustrate the javascript grammer and pattern using the test case