Passing optional callback function as an argument by default?

New here, I was following some tutorial but I had a question.
for example there is a function on the client side
function x(){
return 1;
then on the console we could execute the function with a callback param
x(function(err,res){console.log(res) })
but in x function the callback param is not implemented . how it is being executed? does it allows assume there will be a callback function could be passed as param? where is this mentioned.

Which tutorial are you following?

sorry can’t remember the source but this is what I understood. did I understood it wrong or in which case this could be implemented?