JS - loop function on input list

Will Young's icon

If I have a function in a JS node that works on an input variable, can I pass a list of many of those variables in to the JS node and have something like a foreach loop call the function for each one?

do.while's icon
Will Young's icon

Thanks!