Developer newsJavaScript snippets and notes
JS exponential operator
Hi there! How are you? I hope you are well!
JS has an expo operator!
Did you know this? For me it was a big surprise, until today I looked for a way to solve a problem like make a function pow(base, power) that calculates the power of the first argument etc…
!!!
After I solved it with a loop I googled around a lil’ bit and bumped into this:
Here is my implementation: