This seems strange.
I should rest before answering
And ofc mandatory callback as
On the client, if you do not pass a callback and you are not inside a stub, call will return undefined, and you will have no way to get the return value of the method.
On the client, if you do not pass a callback and you are not inside a stub, call will return undefined, and you will have no way to get the return value of the method.
In other words, JavaScript does not wait for your call to finish before carrying on. This is a key characteristic of asynchronous code. If you have an asynchronous request (like AJAX or a Meteor.call), which could take several (hundred) milliseconds to complete, you do not want to block the rest of your code while that’s happening.
A callback lets your code carry on until the ayschronous code completes. At that point, the function you registered as the callback (in the above example, it’s an inline, anonymous function) is invoked with a set of parameters specified for that type of callback. For a Meteor.call (and many others) these parameters are error and result. The correct action as @jrudio pointed out in his more complete code sample is to check for an error before using the result.