Passing a math operator as a parameter

前端 未结 6 1302
长发绾君心
长发绾君心 2021-01-03 18:45

I\'d like to write a function in Javascript that allows me to pass in a mathematical operator and a list of ints and for each item in that list, apply the operator to it.

6条回答
提交回复
热议问题