0

I'm building a function which gets a variable that includes a mathematic operator, and two random numbers. I want to return the result of the suitable math action, but I'm not sure how the code should be written.

function result(firstnum, secnum, operator) {
return [???];
}
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437

0 Answers0