I saw a piece of sample code like this in a javascript code.
exec: function(myString){
var: link1=link2;
editor1=editor2;
link1.execute();
},
I would like to know why the syntax is like this : exec: function()? does it mean just to execute this function at run time? Why there is no function name here?
Thanks
This is part of an object declaration. The
exechas no special meaning, it’s just the name of a property in an object.Then you can do: