In Javascript, I would like to assign subarray with name from a variable, I can hardcode the proArr to have subarray "create" and "update" as per below...
proArr.create = ...
proArr.update = ...
however, I'd like to dynamically assign the name of the subarray instead, something like this...
let func = "create";
upload(func);
.
.
.
function upload(func){
proArr.(func) =
I'm sure this question has been asked many times, but being a newbie I'm not getting results likely not asking the right terms. Any pointer is greatly appreciated.