I am a beginner. I am trying to do something like this -
function write(x, y, z) {
x();
console.log("This is foo: ", y, z);
}
var b = 32,
c = 92;
function a(d) {
console.log("This is d from a:", d);
return d;
}
write(a(12), b, c);
And I am getting an Error below -
caspio-common.js:73 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at HTMLDocument.<anonymous> (caspio-common.js:73:26)
at f_dataPageReadyEvent.dispatchEvent (<anonymous>:1:523)
at f_dataPageReadyEvent.init (<anonymous>:1:91)
at new <anonymous> (<anonymous>:2:34)
at <anonymous>:1:1
at f_dpLoadObj.addScriptElement (...
My question is how can I run x(x) with parameter inside write function.
Thank you
a.bind( null, 12)write(() => a(12), b, c)