I want to have this function as an arrow one (cuz it looks cool) and it works fine for small numbers but problem accours at large numbers where exponent is used, so i tried to solve it like that but this isn’t defined, what to do?
there’s a lot of material and I don’t uderstand what to switch this with, I already read some parts before posting this post, I wouldn’t post it if I’d understand
Well, long story short: you can’t, or at least not in any reasonable way.
Arrow function are specifically designed to not bind this, therefore making it “impossible” to use it to chain methods.
For a case like this one, where you want to heavily rely on chaining the good 'ol function is the right tool for the job.
(also personal opinion, even nicer to read than the proposed arrow )