I came across some JavaScript syntax I haven't seen before. Can someone help point me in the right direction, I'm not even sure what I could google to learn more :/
$.variable = function() {
return a(b, [{
key: "setPeriod",
value: function(t) {
this.variable.period = t;
}
}, {
key: "location",
get: function() {
return "earth";
}
}])
}
$.variable.setPeriod("test");
$.variable.location;
My question is what is this structure where an object is defined via a list. Also not sure what the difference between value and get is. Any help would be appreciated.
Here's an example of a snippet:
https://pastebin.com/zymW2XZw
()- is missing. Did you copy-paste ?aandbplease ?returnstatement which returns the output of the functionswhich includes an array of objects all of which include thekeyandvaluefields.