2022
Panel |
---|
Example 2 |
The following Example 2 shows helps the user to define the color priority , below is the code snippet of a user defined function and Test method to execute it .
Code Block |
---|
//@Test function test(){//@UserDefined function chooseColor(priority) { var color = ""; if(priority == "High"){ color = "Red"; } else if(priority == "Medium"){ color = "Yellow"; } else if(priority == "Low"){ color = "Green"; } return color; } //@Test function test(){ fullName("Pavan", "Jagadeeswaran"); } fullName("Pavan", "Jagadeeswaran"); |