0

I want to loop through all methods in Math object in JavaScript.

I have tried:

for(const [name ,function] of Object.entries( Math )) { /* code */ }

but Object.entries returns an empty array every time for some reason.

Is there a way to loop through all of the Math functions?

T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875

0 Answers0