2022
The following Example 2 helps the user to define the color priority , below is the code snippet of a user defined function and Test method to execute it .
//@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"); }