foreach,_.foreach

Function Description
Takes three parameters. For each element in the list or UPJSObject applies the function with the arguments if they are defined.
Function prototype
_.foreach(list,func,args). For each element in the @list applies @func with @args if they are defined. For each element in the UPJSObject applies @func with @args if they are defined.
Function parameters
@list - list of dom elements
@func - function to be called with element from @list
@args - function arguments
Sample HTML DIV element is given to try UPJS function.
Orange DIV
Apple DIV
  • apple 1
  • apple 2
Code area to try out foreach,_.foreach function.