This is my current code:
const fn = parameter => { // if, else ... fn(X); }; fn(0);
Now, I can\'t use this approach as I need to cal
First, let me put the disclaimer that Immediately-Invoked-Function-Expressions (IIFE) are considered bad practice in ES6, and this is tail-recursion and personally I would change it to a for loop.
but you can always do this I guess:
((x) =>{ const fn=(p)=>{ //whatever fn(q) } fn(x) })(0)