Owen Rossi-KeenO
Reactiflux4y ago
15 replies
Owen Rossi-Keen

ekomS – 23-57 Dec 21

I have an object with nested functions, like so:
const arrayFunctions = {
  f1: (a)=> {},
  f2: (a,b)=> {},
  f3: {
    test: (a)=>{}
  }
} 

Is there any way I can specify default behavior if just
arrayFunctions
is called? Example:
let a = arrayFunctions.f1([1,2]);
let b = arrayFunctions([4,3,2]);
Was this page helpful?